Repository navigation
Bots are told when a chat is allowed and what became of their offers; they say an offer arrived only when it was confirmed - #2502
Merged
Conversation
… allowed, and what became of its recent offers; it says an offer arrived only when that computer confirms delivery
…names and quotes can't end the pack's frame; a message that drops the chat's allowance says so; the tool says offered and when no click is needed
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since #2497, a bot's offered message can reach a bot on the owner's other computer without a click, and that computer reports what became of each offer. The bot still reads the stage-1 words: "Your owner picks the bot there and sends it, or not. You get no answer." It can't tell the owner whether an offer arrived, and nothing tells it that the chat was allowed.
Change
bot_offer's description says an offer goes without a click only while the owner's messages in that turn came with the chat allowed andtomatches exactly one bot they picked; otherwise the owner can use Send while it is open.toasks for the bot's name as the owner gave it, or nothing.status: "offered"(what the call did, also on a retry after delivery) and confirms the offer only: "Offered on ANIMATRIX. This confirms the offer only. Don't wait or offer it again." A retry under the same call key starts with "Same offer as before, not a second one."+bot_idkeeps SQLite off the bot's index), so a long chat with no offers costs nothing.BOTS_GUIDANCE) adds three short lines:bot_send, a relay or a thread);docs/bots.md→ "What the bot is told".Design
The wording came from a level 3 design: three independent proposals, then a one-round council review of all three against one rubric. Two of the three reviewers picked the proposal built here (the most truthful and the shortest). The third picked another proposal but grafted this one's list lines and grant line into it. Grafts from the other two:
The list was first planned for turns from the offering device only. It is on every chat turn instead, so "none now" is never said while offers still stand.
How to review
src/shared/bots/personal/offers.ts: the words (OFFER_ALLOWED_LINE,OFFER_ALLOWED_DROPPED_LINE,recentOfferLine).BotEngine.offerSituationandBotStore.recentRowsWithPrefix: which offers, and how they are read.contextPack.ts→situationFacts: where the two facts sit, and what decides a change.BotChatService.send: the line on a message that takes the allowance off.catalogue.ts,appTools/bots.ts,changelog.ts: the bot-facing text.Verification
node scripts/verify.mjsPASS @ ddbbfff (master with Allow for this chat: the picker, who it reaches, time left and End access; offer cards say what became of each #2500 merged in): 23 test files (1,266 tests, with the two-daemon test) and both typechecks.tests/bots/memory/botChatEpochPack.test.ts→ "offered messages in the situation":tests/bots/offeredMessagesGrant.test.ts, over the two-daemon setup:EXPLAIN QUERY PLAN:SEARCH bot_messages USING INDEX sqlite_autoindex_bot_messages_1 (id>? AND id<?)).Refs #2490