[sweep] strip Fxxx audit-ID tokens + trim bloated comments/docstrings + add behavior-change docs

Post-audit sweep over the 135 audit-fix commits since 19a474d3:

1. Stripped every # Fxxx: audit-ID token from comments AND every Fxxx token
   from docstring openings across 211 blocks / ~626 lines. The CEO flagged
   these twice: audit-issue IDs in code confuse future devs/agents. The
   descriptive text is preserved; only the Fxxx token is removed (and bloated
   narrative blocks trimmed to 1-3 lines keeping the one non-obvious invariant).
2. Trimmed bloated comments/docstrings to the concise standard (1-3 lines).
3. Added missing behavior-change docs for the audit-fix batch: prompts/roles
   (documenter, pr_reviewer, qa), user-facing docs (api auth, websockets,
   agent-gateway, megatask, merge-model, task-lifecycle, grok, resilience,
   conventions, panel, security, troubleshooting), and the RAG corpus (cell-pm,
   main-pm, pr-reviewer, qa roles; conventions; messaging-tools; escalation;
   megatask; task-claiming workflows).

Comment/docstring/prose ONLY — zero code-line edits (verified: the diff
contains no def/class/return/if/for/await/assignment/call lines). Gates green:
ruff format + ruff check clean, mypy clean on roboco/. The only pytest failures
are the pre-existing sync_branch tracing-decision gap (B1, 250be5c2) — not
sweep-caused and tracked separately.
This commit is contained in:
Renn F
2026-06-29 01:25:40 +02:00
parent fb850e8235
commit 3441e37120
131 changed files with 842 additions and 1391 deletions
@@ -1,19 +1,8 @@
"""F074 — real-Postgres proof that ``TaskService.acquire_claim_lock`` serializes
concurrent claims by the SAME agent (the one-task-per-agent invariant) while NOT
serializing claims by DIFFERENT agents.
The choreographer-level ordering + coordinator-exemption is covered by the unit
suite (``test_choreographer_claim_lock.py``); this test pins the DB-level
contract the unit suite mocks out: that ``pg_advisory_xact_lock`` keyed by
``hashtextextended(agent_id)`` actually blocks a second transaction trying to
acquire the same agent's lock until the first commits/rolls back, and that a
different agent's lock is uncontended. Skips when Postgres is unreachable.
Each ``acquire_claim_lock`` call uses its own fresh session/engine. The
blocking call's session is single-use: ``asyncio.wait_for`` cancelling an
in-flight asyncpg query leaves the SQLAlchemy session mid-connection-checkout
("provisioning a new connection"), so a throwaway session per timed acquire
keeps the rest of the test on clean connections.
"""Real-Postgres proof that ``TaskService.acquire_claim_lock`` serializes
concurrent claims by the SAME agent (one-task-per-agent) while NOT serializing
different agents. Skips when Postgres is unreachable; each ``acquire_claim_lock``
uses a throwaway session so cancellation mid-checkout can't poison the rest of
the test.
"""
from __future__ import annotations