Repository navigation
docs(backend): restore agents-md-lean headroom for backend/AGENTS.md - #11411
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_a9b30fb5-9a17-417e-8078-fb6be71b90bc) |
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Verified the move is verbatim — every deleted subservice bullet (pusher, llm_gateway, diarizer, agent-proxy, nllb_translation, modal) and all five memory-continuity gate rows reappear unchanged in Agent-context note: subservice internals and the memory-gate matrix are now just-in-time docs rather than always-loaded context. The pointers are clear and the content is faithful, so this is the intended agents-md-lean pattern — no information lost. The PR Metadata Preflight failure is from — glm-5.2 maintainer review by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
b7906af to
dc16028
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5317eb89-c13f-4546-acdc-fba9ebe910ed) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc16028f50
ℹ️ 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".
|
|
||
| | Gate | What it covers | What it does **not** cover | | ||
| | --- | --- | --- | | ||
| | **Hermetic pipeline E2E** (`testing/e2e/test_canonical_memory_pipeline.py`) | capture→consolidate→promote→read, archive excluded from default reads, surface default-access matrix, projection fail-closed without legacy bleed | Deployed revision identity, prod IAM/index deltas, live LLM consolidation | |
There was a problem hiding this comment.
Use a valid path to the moved pipeline test
After moving this matrix under backend/docs/, testing/e2e/test_canonical_memory_pipeline.py resolves neither relative to this document nor from the repository root; the file is actually at backend/testing/e2e/test_canonical_memory_pipeline.py. Agents following the matrix therefore cannot reach the cited hermetic test, and this is no longer detected because check_agent_doc_references.py scans component AGENTS.md files and docs/agents/, not backend/docs/. Use the repository-relative path or keep the reference document in the checked agent-doc tree.
AGENTS.md reference: AGENTS.md:L143-L145
Useful? React with 👍 / 👎.
| prompts.py # LLM prompt templates for memory extraction, categorization, etc. | ||
| translation.py # Multi-language translation coordination | ||
| speaker_identification.py # Speaker diarization + person matching against speech profiles | ||
| # Per-subservice internals: backend/docs/subservice-internals.md |
There was a problem hiding this comment.
Ratchet the budget down after shrinking the guide
Moving this material removes roughly 3 KB from backend/AGENTS.md, but the commit leaves its check_agents_md_lean.py limit at 39,000 bytes. That check explicitly defines its limits as a downward ratchet and instructs that the budget be lowered in the same change when a guide shrinks; retaining the old limit lets future additions consume all reclaimed space without failing CI, defeating the preventive purpose of this commit. Lower the backend line/byte limits alongside the move.
AGENTS.md reference: AGENTS.md:L143-L145
Useful? React with 👍 / 👎.
Git-on-my-level
left a comment
There was a problem hiding this comment.
Reviewed as glm-5.2. Approving — this is a clean, verbatim docs relocation that restores CI headroom.
Per-file observations:
-
backend/AGENTS.md (+3/-30): Two content blocks removed and replaced with pointers. The per-subservice internal bullets (pusher, diarizer, agent-proxy, nllb_translation, modal) are replaced by 'Per-subservice internals: backend/docs/subservice-internals.md' pointers in the directory tree, and the five-row memory-continuity gauntlet gate table is replaced by 'Gate-by-gate coverage matrix: backend/docs/memory-continuity-gates.md'. The Service Map (inter-service call graph, deploy/runtime contracts) and all setup/test/async/logging-security rules remain inline — correct, since those are what agents read most frequently.
-
backend/docs/subservice-internals.md (new, +41): Verbatim copy of the removed per-subservice bullets, wrapped in a fenced code block with a header explaining the move and the size-ratchet rationale. Content matches the removed lines exactly, including the agent-proxy keepalive (120s), AES-256-GCM encryption note, and nllb Gemini fallback.
-
backend/docs/memory-continuity-gates.md (new, +19): Verbatim copy of the removed five-row gate coverage table, with a self-contained header ('Do not confuse these gates...') and the CI self-check note. The 'never fake GO' line is correctly preserved in both this doc and the AGENTS.md pointer context.
Agent-behavior note: these are agent-instruction files, so the relocation affects what AI coding/review agents see when they load backend/AGENTS.md — they now get pointers instead of inline subservice/gate detail and must follow the links for that information. The guidance content itself is unchanged (verified verbatim), so there is no behavioral change to what agents should do.
Verified: check_agents_md_lean.py passes at this head (7 AGENTS.md files within budget), content is byte-for-byte moved with no paraphrasing or silent drops, and all backend checks (Hermetic Merge Gate, Backend E2E, Sync Cloud Tasks Gauntlet, Listen Pusher Gauntlet) are green.
Thanks for the proactive fix — being one sentence away from breaking the lean ratchet on main would have blocked every AGENTS.md-touching PR.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
dc16028 to
b7906af
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_2439106c-b243-4689-a34f-50cc30d43706) |
backend/AGENTS.md had 64 bytes of headroom under its 39,000-byte agents-md-lean budget. Moves the per-subservice internal bullets (pusher, diarizer, agent-proxy, nllb_translation, modal) out of the Directory Structure tree into backend/docs/subservice-internals.md verbatim, leaving one line per subservice plus a pointer. Nothing is dropped; the Service Map and its deploy contracts stay in AGENTS.md.
The five-row gauntlet gate coverage table is rarely-needed rollout reference. Moves it verbatim to backend/docs/memory-continuity-gates.md, keeping the do-not-confuse rule, the CI self-check line, and the NOT_RUN rule in AGENTS.md with a pointer.
b7906af to
5baeeea
Compare
Preventive:
backend/AGENTS.mdhad 64 bytes of headroom under its 39,000-byteagents-md-leanbudget. When a component guide blows its budget the check goes red onmain, and since it triggers on**/AGENTS.md, every PR touching any AGENTS.md then fails and aborts Hygiene before the other guards run. That just happened withdesktop/macos/AGENTS.md(#11409, fix in #11410). Backend was one sentence away from a repeat.What moved (nothing deleted, nothing paraphrased)
backend/AGENTS.mdbackend/docs/subservice-internals.mdbackend/docs/memory-continuity-gates.mdBoth moved verbatim, each leaving a pointer. Setup, test commands, the Service Map and its deploy contracts, async/executor rules, and logging-security rules all stay in
AGENTS.md— that is what agents read constantly.Result
backend/AGENTS.md: 38,936 → 35,829 bytes (headroom 3,171), 337 → 309 lines (headroom 41). No budget incheck_agents_md_lean.pywas touched.Verification
python3 .github/scripts/check_agents_md_lean.py— backend passes; the only remaining failure is the pre-existingdesktop/macos/AGENTS.mdoverage that docs(desktop): unblock agents-md-lean by moving agent-swift reference into docs/ #11410 fixes.make preflight— with docs(desktop): unblock agents-md-lean by moving agent-swift reference into docs/ #11410 merged locally into a throwaway branch,agents-md-leanand every other selected check passes on this diff.Also worth flagging (not fixed here)
web/admin/AGENTS.mdis at 137 bytes of headroom (1,363 / 1,500) and 4 lines spare — next candidate for the same treatment.Product invariants affected: none (
scripts/pr-preflight --suggest). Nofix:commits, so no failure-class declaration is required.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only relocation with no code, config, or runtime changes. Content is moved verbatim with pointers left in place.
Overview
Shrinks
backend/AGENTS.mdunder theagents-md-leansize ratchet by moving two verbatim detail blocks into dedicated docs, leaving pointers behind.Subservice internals (pusher, diarizer, agent-proxy, nllb_translation, modal bullets) move to
backend/docs/subservice-internals.md. The Service Map and deploy contracts stay inAGENTS.md.Memory continuity gate coverage table moves to
backend/docs/memory-continuity-gates.md. No product or runtime behavior changes.Reviewed by Cursor Bugbot for commit b7906af. Configure here.