Repository navigation
fix(agents): make the resync topic list honest about its cap - #258
bniladridas wants to merge 2 commits into
Conversation
The resync notice told the agent that each topic came with its room_id and topic_id, then cut the list at 40 with "and N more", so a long list read as complete and an agent could silently miss topics when catching up. Past 40 the notice now says it lists the first 40 of the total and points at topics_list for the rest. The design note and the bundled skill say the same, and a test with 45 topics pins the omission count and the pointer. Refs Vycari#253 Signed-off-by: Niladri Das <125604915+bniladridas@users.noreply.github.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Vycari ReviewRound 2 on 597817b. The verdict is the Vycari Review check run, and each open finding is an inline thread. Reply on every P0 and P1 thread: Open: P0 0 · P1 0 · P2 0 · disputed 0 · confirmed fixed 1 · withdrawn 0 Hand-off: Not handed to Greptile yet. 1 Greptile finding(s) not addressed (GR-4570376265): fix each and reply Greptile follow-through
No open findings this round. P2s, judge's notes and closed findingsJudge's notes The earlier finding (and Greptile's matching one) that the resync notice sent the agent to topics_list for archived topics the tool never returned is fixed. topics_list now takes archived=true, and the notice tells the agent to use it. No new candidates survived. Confirmed fixed
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a0bc71797
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@greptileai review |
The resync notice counts every topic the startup map knows, archived ones included, but pointed at topics_list, whose default folds archived topics. An archived topic beyond the 40th row was counted and could never be found through the recovery tool. topics_list now takes archived, mirroring topics list --archived, and the notice asks for it when it truncates. The default listing is unchanged, and tests cover 45 topics whose omitted rows are archived plus the tool's new argument. Refs Vycari#253 Signed-off-by: Niladri Das <125604915+bniladridas@users.noreply.github.com>
Human overview
A resync notice tells the agent which topics to catch up on, but it lists at most 40 and used to append "and N more" while also saying each topic came with its
room_idandtopic_id. Past 40 the notice now states how many of the total it lists and points attopics_listfor the rest, andtopics_listnow takesarchived, because the notice counts archived topics that the tool's default view folds. Fixes #253, part of #122; this PR does not finish #122.AI reviewer
Details for agents: what the diff does, invariants, verification, checklist
What the diff does
ChannelWorker._flush_resynckeeps the first 40 topics and their existing per-topic format, but replaces the; and N moresuffix with; this lists the first 40 of N, so call topics_list with archived=true for the restwhenlen(known) > _RESYNC_TOPICS_SHOWN.topics_listgains an optional booleanarchived, mirroringpepper topics list --archived. The default fold is unchanged: an archived topic is left out unless it is the room's default._RESYNC_TOPICS_SHOWN's comment now separates the cause cap, which still says "and N more", from the topic cap, which points at the tool.INSTRUCTIONS,planning/claude-code-channel.mdandsrc/pepper_cli/data/agent-skill/SKILL.mdno longer claim the notice or the default tool lists every topic.tests/test_claude_channel.pyupdates the resync test to 45 topics whose omitted five are archived non-default topics, addstest_topics_list_can_include_archived_topics_on_request, and pins the tool schema'sarchivedproperty.Invariants
topics_listcall returns exactly what it did before: archived topics folded except a room's default.room_idandtopic_id, and the untruncated notice path is unchanged.Alternatives rejected
topics_list: that would stop matchingpepper topics list's fold and offer archived topics as ordinary places to post.; and N morealone: it made a truncated list read as complete.Where to look hardest
archived=true; the new resync test puts every omitted row in the archived set, so dropping the flag or reverting to the old wording fails.args.get("archived") is Trueaccepts only a JSON boolean, matching the schema; a truthy non-boolean such as the string"false"does not flip the fold.> 40; exactly 40 topics must render no pointer and noarchived=trueadvice.Failure posture
If this is wrong, an agent in a large workspace can still infer the list is complete, or can be sent to a tool view that hides the very archived topics it omitted. The tests pin the count, the pointer, the flag, topic 40's absence, and the default fold.
Verification
Run on the branch head
597817b:.venv/bin/ruff format --check: 150 files already formatted..venv/bin/ruff check: all checks passed..venv/bin/ty check src/pepper_cli/: all checks passed..venv/bin/python -m pytest -n auto --cov --cov-report=json:coverage-summary.json: 3344 passed, 2 skipped; total coverage 95.71 percent, floor in.claude/maintainerd.jsonunchanged at 88..venv/bin/python -m pytest tests/test_claude_channel.py -k "resync or first_forty or topics_list or tools_list" -q: 19 passed.git diff --check: clean.Deferred
Checklist (repo-specific)
uv run ruff format --checkanduv run ruff checkclean (no new lint ignores)uv run ty check src/pepper_cli/cleanuv run pytestpasses; coverage floor in.claude/maintainerd.jsonnot lowered/api/v1request, response, or frame changedSKILL.mdupdated if commands or output changedhelp/cli.mddoes not describe the notice wording or the tool schema