fix(tooling): prevent native audit worker recursion - #1895
Merged
Conversation
gfyrag
requested review from
Azorlogh,
flemzord and
paul-nicolas
as code owners
September 4, 2026 11:09
Contributor
✅ Approve — automated reviewThe worker prompts clearly establish the non-recursive leaf role before repository guidance is loaded, and the added tests cover both audit and challenge prompts. No actionable defects were found. No findings. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/v3.0 #1895 +/- ##
=============================================
Coverage 77.23% 77.24%
=============================================
Files 478 478
Lines 51258 51258
=============================================
+ Hits 39591 39596 +5
- Misses 8232 8234 +2
+ Partials 3435 3428 -7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ai-audit,ai-audit-challenge, andai-audit-jiraorchestrationRoot cause
The provider prompt marked
AGENTS.mdanddocs/technical/agent-context.mdas authoritative without first defining the provider as an already-launched leaf worker. Those repository routing docs tell outer agents to invoke the native audit and challenge launchers, so the provider could follow them recursively from its read-only sandbox.Bugfix evidence
BEFORE_FIX=BUG_REPRODUCED: focused prompt-capture tests failed on the exact base because neither worker prompt defined or enforced the leaf role.TEST_SENSITIVITY=PASS: temporarily removing the prohibition makes both focused regressions fail.scripts/ai-auditand thenscripts/ai-audit-challenge; its fake provider records no nested-launcher attempt.Validation
go test -race ./scripts/aiaudit ./scripts/aiauditchallenge -count=1bash scripts/check-repo-invariantsbash scripts/agent-checkAI_REVIEW_BASE_SHA=3a8eda3636df48873558140161a852393b4adc6e bash scripts/agent-check-prgit diff --checkNo audit redesign, PR workflow change, runtime/product change, or Jira publication.