Development chronicle β mb636 to mb637 Β· Cross-channel AI summaries, privacy-aware publishing and canonical channel identity
Mediabotβs AI summary command can now read a channel other than the one where the operator is standing.
The new syntax is simple:
ai #35+ans summary
but internally it changes an important assumption: the channel being read no longer has to be the channel where Mediabot is speaking.
No database schema change was required.
ai [#channel] summaryThe canonical syntax becomes:
ai [#channel] summary [period] [nick] [options]
Existing forms remain unchanged:
ai summary
ai summary public
ai summary today
ai summary 7d
A named source channel can now be used:
ai #35+ans summary
By default, the result is sent privately as a notice.
To publish the result on the current channel:
ai #35+ans summary public
The #channel token is recognized only immediately before summary.
That is deliberate: a normal Claude prompt such as:
ai #linux c'est mieux que quoi ?
must remain a normal AI prompt.
Reading the current channel requires:
Administrator
Reading another channel privately also requires:
Administrator
But publishing the summary of another channel into the current room requires:
Master
The difference is the audience.
Inspecting another channel privately and reproducing its conversation in front of people who were not there are not the same action.
A denied cross-channel publication is rejected before any summary database query is executed.
The command now carries two channel identities:
source channel
= conversation being read
destination channel
= place where "public" output is sent
For:
ai summary public
both are the current channel.
For:
ai #35+ans summary public
they are different.
The source channel owns the database queries, exact message count, period slicing, nickname filtering, last timestamp, language selection and summary label.
The destination channel only determines where public output is sent.
Without an explicit language option, the summary language now follows the source channel.
So a French source channel remains French even if the operator launches the command from another room.
An explicit language still wins:
ai #canal-fr summary en
A channel that Mediabot does not know is now reported as unknown.
It no longer falls through to a misleading:
no messages found
An unknown room and an empty room are two different conditions.
The final pre-commit audit found one IRC-specific edge case.
Channel lookup was already case-insensitive, so:
#35+ANS
could correctly find:
#35+ans
But the rest of the summary code still kept the spelling supplied by the operator.
That could create two state keys:
summary_last:#35+ANS
summary_last:#35+ans
for the same IRC channel.
A later:
ai #35+ans summary last
could therefore behave as though no previous summary existed.
After mb637:
#35+ANS
β
case-insensitive lookup
β
Channel object
β
canonical name
β
#35+ans
From that point onward, SQL, language resolution, labels and summary_last all use the canonical channel identity.
So:
#35+ANS
#35+ans
#35+AnS
all share exactly one summary history.
Test 817 protects the complete cross-channel contract:
historical summary forms
explicit source channel
Administrator access
Master-only cross-channel publication
denial before DB access
unknown-channel handling
source/destination separation
normal AI prompt non-capture
canonical channel identity
case-independent "last" history
The final targeted validation completed green before commit.
The Pensieve is no longer bolted to the room where the Headmaster happens to be standing.
An Administrator can open the memory of another hall and study it privately.
Carrying that memory into the Great Hall and reading it aloud requires a stronger key.
And whether someone writes the room name in capitals, lowercase or a mixture of both, Mediabot now remembers one important rule:
a room has one identity, even when IRC lets people spell its name more than one way. ::: ββ
You must be logged in to reply.