[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
+7 -7
View File
@@ -78,7 +78,7 @@ async def test_has_unpushed_commits_false_when_session_missing() -> None:
# ---------------------------------------------------------------------------
# F062 — merge_pr must be idempotent + active-guarded like close()/complete()
# merge_pr must be idempotent + active-guarded like close()/complete()
# ---------------------------------------------------------------------------
@@ -114,9 +114,9 @@ async def test_merge_pr_completes_active_session() -> None:
@pytest.mark.asyncio
async def test_merge_pr_idempotent_on_already_completed_preserves_audit_trail() -> None:
"""F062 (mode 1): a retried merge after a successful-but-unconfirmed GitHub
merge must NOT overwrite the original ``merged_by`` / ``pr_merged_at`` — the
merge audit trail is preserved. Mirrors close()'s idempotency guard."""
"""A retried merge after a successful-but-unconfirmed GitHub merge must NOT
overwrite the original ``merged_by`` / ``pr_merged_at`` — the merge audit
trail is preserved. Mirrors close()'s idempotency guard."""
original_merger = uuid4()
original_ts = datetime(2026, 6, 1, 12, 0, tzinfo=UTC)
@@ -144,9 +144,9 @@ async def test_merge_pr_idempotent_on_already_completed_preserves_audit_trail()
@pytest.mark.asyncio
async def test_merge_pr_does_not_resurrect_abandoned_session() -> None:
"""F062 (mode 2): merge_pr on an ABANDONED session must NOT flip it to
COMPLETED — that would silently undo the single-active invariant's
abandonment and make discarded work look like a successful merge."""
"""``merge_pr`` on an ABANDONED session must NOT flip it to COMPLETED — that
would silently undo the single-active invariant's abandonment and make
discarded work look like a successful merge."""
ws = MagicMock(status=WorkSessionStatus.ABANDONED, pr_number=42, merged_by=None)
svc, session = _merge_service()