Fix issue-reference guard before mass rollout #341
Labels
No labels
burndown-2026-06
coherence-core
consult
headless
interactive
P0
P1
P2
P3
P4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coilyco-flight-deck/agentic-os#341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Review of commit
ae3677c83dfound that enabling issue-reference-guard in aos produced false-positive cleanup and mangled valid command examples.Concrete failures:
.agents/skills/coding-git/references/push-and-create-pr.mdhad valid sample PR bodies changed fromCloses #42toCloses issue, which is not a correct CLI/API example.warp/tab_configs/claude-agent-work.mdhad validowner/repo#Nward CLI examples rewritten toowner/repo/issue-N, which does not match the documented ref syntax.tests/test_check_commit_closes_issue.pyandtests/test_check_text_guards.pynow construct issue-ref strings dynamically just to avoid the literal pattern, which means the guard is constraining tests that intentionally exercise the syntax.warpdotdev/Warp#2579and GitHub/Forgejo issue URLs were removed from docs even where the issue link is the stable upstream reference, not a stale local planning breadcrumb.Root cause from code inspection:
agentic_os/pre_commit/check_issue_references.pyscans raw text with broad regexes.allow_globs. It does not distinguish durable prose from fenced code, inline code, quoted command strings, test fixtures, or third-party upstream issue links.Request before mass rollout:
issue-reference-guardso it does not flag issue syntax inside fenced code blocks, inline code spans, quoted command examples, or test fixtures that intentionally exercise issue parsing.Closes #42in a fencedgh pr createexample,owner/repo#88in a ward CLI example, test fixture strings, and a third-party upstream issue URL.ae3677c83d.See #337 for the draftin ordinary prose.ward exec testandpre-commit run issue-reference-guard --all-files --hook-stage manual.This should land before the issue-reference guard is mass-rolled across repos.
🔒 Reserved by
ward agent --harness claude— containerengineer-claude-agentic-os-341on hostkais-macbook-pro-2.localis carrying this issue (reserved 2026-07-08T18:26:48Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (1h TTL);--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-flight-deck/agentic-os#341· branchissue-341· harnessclaude· workflowdirect-mainengineer-claude-agentic-os-341· wardv0.463.0· dispatched2026-07-08T18:26:48ZStatic container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.463.0).
— Claude (she/her), via
ward agentAdditional concrete regression from the same commit:
.agents/skills/coding-git/references/conventional-commits.mdwas also mangled.The commit example changed:
to:
And the "Linking Issues" examples changed:
to invalid placeholder-like syntax:
This is slightly different from the PR-body example but the same root policy bug: the guard is firing on examples where issue-reference syntax is the subject being taught. The fix should include a regression that fenced commit-message examples keep their literal
Closes #42/Fixes #42/Refs #42lines.🔒 Reserved by
ward agent --harness codex— containerengineer-codex-agentic-os-341on hostkais-macbook-pro-2.localis carrying this issue (reserved 2026-07-08T19:29:28Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (1h TTL);--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-flight-deck/agentic-os#341· branchissue-341· harnesscodex· workflowdirect-mainengineer-codex-agentic-os-341· wardv0.463.0· dispatched2026-07-08T19:29:28ZStatic container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.463.0).
— Codex, via
ward agentReadiness check from 2026-07-09: not ready for rollout, and not ready for normal N+1 enforcement yet.
Live AOS main (
v0.227.0) hasissue-reference-guardenabled for itself andPYTHONPATH=/scratch/aos-readiness python3 -m agentic_os.pre_commit.check_issue_references $(git ls-files)passes on AOS. But the implementation is still the broad raw-text scanner from this issue body: it does not distinguish prose from code/test fixtures/examples/generated surfaces.Scratch N+1 opt-in results:
coilyco-flight-deck/ward, with only[tool.agentic-os.issue-reference-guard] enabled = true, fails with 799 violations. The hits include tests, CLI examples, issue syntax fixtures, generated/openapi guardfiles, and stable docs links.coilyco-flight-deck/infrastructure, same scratch opt-in, fails with 241 violations. The hits include Ansible role comments, docs change logs, workflow commit messages, scripts, service files, and stable issue URLs.Conclusion: the hook is OK as an AOS dogfood guard after its local scrub, but N+1 should be report-only/research until this issue narrows the parser/policy. Minimum next fix: skip fenced code, inline code, quoted/test fixture strings, generated files, and encode a policy for stable upstream issue URLs. After that, rerun scratch opt-in on
wardandinfrastructurebefore any repo-owned rollout issue.WARD-RESERVATION: held 🔒
reservation details
Holder: container
engineer-codex-agentic-os-341on hostkais-macbook-pro-2.local.Reserved by
ward agent --harness codex(reserved 2026-07-09T18:25:35Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (1h TTL).--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh. That is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-flight-deck/agentic-os#341· branchissue-341· harnesscodex· workflowdirect-to-mainengineer-codex-agentic-os-341· wardv0.493.0· dispatched2026-07-09T18:25:35ZStatic container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.493.0).
— Codex, via
ward agentWARD-OUTCOME: done ✅
details
workflow: direct-to-main; review summary: skipped by ~/.ward/config.yaml default
felt: narrow and mechanical
confidence: high
surprises: the policy note needed its example on one line
follow-ups: none