Repository navigation
fix: hand the model the configured repos and tag only the reporters - #38
Merged
Merged
Conversation
added 3 commits
October 7, 2026 17:13
The live run showed the model calling delegate_to_conductor with repo "Mac", the runner's name, because `repo: v.string()` never told it which repos exist and the code answered "Repo is not configured for delegation". The input is now a picklist over config.repos, which Flue renders as a JSON-schema enum, and the tool description names the same repos. The request still has to name the repo: with a single configured repo the enum has one value and there is no default. The code-level refusal stays.
The staging run's approval message read "Reporters: <@owner> <@Bloop>". Reporters were every raw-thread author shaped like a user id, and Bloop's own replies are authored by its bot user, because read.ts maps `message.user` before `bot_id`. readRawSlackThread now marks each message that carries a bot_id or whose user is the bot's own, read from auth.test's user_id, and only non-bot messages feed the reporters. The stored raw thread keeps every message in the shape the Task contract pins.
Closes the A3 review P1: Bloop's test reply carried a bot_id, so removing the auth.test user_id check from readRawSlackThread left every test green although the contract requires Bloop's own user out of the reporters. Bloop's reply now has no bot_id, so each exclusion branch has its own pin.
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.
Summary
76bb168feat: offer the configured repos as the tool's repo enumb522749fix: keep Bloop and every other bot out of the reportersb522749The wave-end E2E on staging measured two defects in one flow: "delega este bug al conductor del Mac" made the model call
delegate_to_conductorwith repo "Mac", and the approval message read "Reporters: <@owner> <@Bloop>".repois nowv.picklist(config.repos)instead ofv.string(), which Flue renders for the model as a JSON-schema enum, and the tool description names the same repos. With a single configured repo the request still has to name it: the enum has one value and there is no default. The code-level refusal of an unconfigured repo stays.readRawSlackThread(packages/core/src/read.ts) now marks every message that carries abot_idor whoseuseris the bot's own user id, read from theauth.testanswer it already makes. Only non-bot messages feed the reporters, so Bloop and any other bot in the thread are no longer tagged. The stored and dispatched raw thread keeps every message in the{ts, author, text, permalink}shape the Task contract pins.Verify
Gates, on
b522749, afterbun install --frozen-lockfile:bun run format:check,bun run lint,bun run typecheck: cleanbun test: 361 pass, 0 fail (17 files)bun run knip: cleanbun run deploy:dry: uploads the staging Worker dry-runbun audit --ignore=GHSA-vfj7-8cjw-p6xm: no vulnerabilitiesbun run verify: same sequence, greenEach new test fails on
9039b05with only the source changes reverted:the tool offers exactly the configured repos as the repo the model must name:expect(received).toEqual(expected)with- ["example", "right-hand"]against+ undefined(the base input had no.options), andv.parseaccepts "Mac" on the base.reporters leave out Bloop's own replies and every bot message:expect(stored?.task.reporters).toEqual(["U2", "U1"])received["U2", "U1", "UBOT", "UBUILDER"]; the fixture's bot messages carry both abot_idand a user id, which is the shape Slack sends for a bot reply and the only shape the base filter let through. Abot_id-only message was already dropped by the base user-id filter.CI: the
verifyjob passed onb522749, 361 tests, in https://github.com/cgaravitoq/agentic-slack/actions/runs/37644245884Not covered