fix(ci): stop enrichment bot commits racing content validation - #92
Merged
Merged
Conversation
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
contentspermission toread. Generated metadata is now a branch-read-only preflight for both same-repository and fork PRs.--require-submittersvalidation; media commands appear only after approval.validate, and normal fork workflow approvals unchanged.Why
Confirmed example: Validate Content run 36976264940 failed with
tools/openrig.md: submitter must be set in tool-submitters.jsonwhile enrichment generated attribution and pushed a bot commit concurrently. The resulting validation needed a maintainer rerun (action_required). Removing branch mutation avoids that race rather than adding credentials, privileged PR-code execution, or automatic approvals.Verification
Executed locally with Node v24.20.0:
node --test --test-reporter=spec test/enrich-preflight.test.mjs test/enrich-workflow-security.test.mjs test/validate-workflow-security.test.mjs— 7 tests, 4 failed as intended, 3 passed before implementation.npm test -- --test-reporter=spec— 90 passed, 0 failed/skipped.npm run validate:content -- --require-submitters— passed: 16 categories, 51 tools, 1 redirect/retirement.git diff --check— passed.Regression coverage prohibits enrichment git commit/push steps and contents-write permission; checks both PR origins' correction/failure path; executes comment generation and mocked first/create plus repeated/update behavior; preserves trusted-base attribution and approval-gated media.
Known limits / scope