Skip to content

fix: hand the model the configured repos and tag only the reporters - #38

Merged
cgaravitoq merged 3 commits into
stagingfrom
cgaravitoq/bd-a3-delegation-inputs
Oct 7, 2026
Merged

cgaravitoq merged 3 commits into
stagingfrom
cgaravitoq/bd-a3-delegation-inputs

Conversation

@cgaravitoq

@cgaravitoq cgaravitoq commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • 76bb168 feat: offer the configured repos as the tool's repo enum
  • b522749 fix: keep Bloop and every other bot out of the reporters
  • HEAD: b522749

The wave-end E2E on staging measured two defects in one flow: "delega este bug al conductor del Mac" made the model call delegate_to_conductor with repo "Mac", and the approval message read "Reporters: <@owner> <@Bloop>".

repo is now v.picklist(config.repos) instead of v.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 a bot_id or whose user is the bot's own user id, read from the auth.test answer 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, after bun install --frozen-lockfile:

  • bun run format:check, bun run lint, bun run typecheck: clean
  • bun test: 361 pass, 0 fail (17 files)
  • bun run knip: clean
  • bun run deploy:dry: uploads the staging Worker dry-run
  • bun audit --ignore=GHSA-vfj7-8cjw-p6xm: no vulnerabilities
  • bun run verify: same sequence, green

Each new test fails on 9039b05 with 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), and v.parse accepts "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 a bot_id and a user id, which is the shape Slack sends for a bot reply and the only shape the base filter let through. A bot_id-only message was already dropped by the base user-id filter.

CI: the verify job passed on b522749, 361 tests, in https://github.com/cgaravitoq/agentic-slack/actions/runs/37644245884

Not covered

  • The live re-run on staging of the wave-end E2E: the conductor runs it after the pin.

cgaravitoq 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.
@cgaravitoq
cgaravitoq merged commit 67ad5f7 into staging Oct 7, 2026
1 check passed
@cgaravitoq
cgaravitoq deleted the cgaravitoq/bd-a3-delegation-inputs branch October 7, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant