Skip to content

fix(instruction-placement): stop sub-agents.md links reading as AGENTS.md in cutover-check - #10597

Merged
kyle-sexton merged 2 commits into
mainfrom
host-run/4281-cutover-agents-md-match
Oct 28, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
host-run/4281-cutover-agents-md-match

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Refs: #4281

Summary

The 2026-10-27 monthly cutover-check run graded condition 1 [UNREACH], though the env-vars page still has the feature-flag heading and no longer carries the AGENTS.md bullet (it graded [MET] on 2026-10-26). The cause is in the "moved bullet" check: it matched AGENTS\.md case-insensitively, so every sub-agents.md link on an env-vars line that also says "flag" counted as the page tying AGENTS.md to a flag. The page has no literal AGENTS.md mention.

Fix

  • The moved-bullet check matches AGENTS.md case-sensitively and as a whole name, so a sub-agents.md link no longer matches. A bullet that really moved under another heading still grades [UNREACH].
  • New stay-quiet test: a delisted page plus a sub-agents.md link beside a flag grades [MET].
  • Patch changelog fragment for instruction-placement.

Verification

  • cutover-check.test.sh: the new check failed before the fix (1/107 failed) and passes after it (107/107).
  • cutover-check.sh --env-vars-file <today's fetched env-vars page>: condition 1 now prints [MET].
  • shellcheck is clean on both scripts.
  • Left out: a rerun of the full ten-repo check after this change; condition 4 stays UNMET until cutover: acknowledge or fix every unacknowledged CLAUDE.md path-detection row #9771 lands, and the host runner reruns the check then.

Related

🤖 Generated with Claude Code

…S.md in cutover-check

Condition 1's moved-bullet check matched AGENTS\.md case-insensitively, so
every sub-agents.md link on an env-vars line that also says "flag" counted as
the page tying AGENTS.md to a flag, and the delisted page graded UNREACH.
Match AGENTS.md case-sensitively and as a whole name, with a stay-quiet test.

Refs: #4281

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 28, 2026 08:45
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T08:48:02.407646Z 713bf72 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 713bf72f6b22dde9ea497e98ada75fe44d42eb03: 0 finding(s), 0 as inline comments.

No security issues found.

I read the full diff (3 files) and the PR context. No changed file matches a trusted path.

  • cutover-check.sh condition 1: the "moved bullet" grep now matches AGENTS.md case-sensitively, with a non-name character or line start before it. This is a grading heuristic for a monthly migration-readiness report. It is not a trust control, merge hold, token scope, kill switch or instruction file. The new regex takes no new input and runs no new command. It reads the same $ev file as before, passed to grep as an argument.
  • The change can only turn an [UNREACH] grade into [MET] when the page has no literal AGENTS.md mention next to "flag". The failure case is a literal mention in a different case, such as agents.md. That has no security impact, and it is the intended trade-off.
  • cutover-check.test.sh: adds a fixture and an assertion. It writes only under $TMP and runs the script with --skip-canary against local files.
  • The .changes fragment is a prose changelog. It has no manifest or instruction-surface effect.
  • The PR context holds no embedded instructions aimed at the review lane.
  • No plugin manifest files are touched, so there are no manifest <field> lines.
  • No cost or hold: nothing here changes billing or paid resources, and no lane spend changes.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 713bf72f6b22dde9ea497e98ada75fe44d42eb03: 0 finding(s), 0 as inline comments.

No findings. I read the full diff (3 files) and the PR context. I ran no tests, so the PR's "107/107" and shellcheck claims are author-claimed and unverified by me.

  • Fix: cutover-check.sh:420 now uses grep -E '(^|[^[:alnum:]_.-])AGENTS\.md'. This is case-sensitive, so lowercase sub-agents.md no longer matches. The - in the exclusion class also rules out any -AGENTS.md prefix. A real `AGENTS.md`, a path such as /AGENTS.md, or a line-start mention still matches, so the "moved bullet" guard keeps working.
  • Test: the new case in cutover-check.test.sh builds on ENVVARS_DELISTED, which is defined earlier at line 106. It adds a line with a sub-agents.md link beside "flag" and expects the MET message. The existing moved-bullet test at lines 347-348 still covers the true-positive path.
  • Closing issue: the PR says "Refs: [Maintenance] Run /instruction-placement:migrate cutover-check #4281", so no closing-issue section exists and there are no acceptance criteria to check.
  • Changelog fragment: the patch bump suits a bug fix.
  • Cost: none. No paid or billed resource is touched.
  • Minor, not reported: the regex has no trailing boundary, so AGENTS.mdx would still match. That is harmless here.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit eac0992 Oct 28, 2026
74 checks passed
@kyle-sexton
kyle-sexton deleted the host-run/4281-cutover-agents-md-match branch October 28, 2026 13:00
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 1, timeout 0, no coverage 0, invalid 0, not run 7.
Covered-code score 0%; mutation score 0%.

File Killed Survived Timeout No coverage Invalid Not run
.github/scripts/pr-merge/enable-auto-merge.mjs 0 0 0 0 0 1
.github/scripts/pr-merge/merge-holds.mjs 0 0 0 0 0 3
plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh 0 1 0 0 0 0
plugins/source-control/skills/babysit-prs/scripts/babysit_merge_policy.py 0 0 0 0 0 2
plugins/source-control/skills/babysit-prs/scripts/babysit_verify_evidence.py 0 0 0 0 0 1

Surviving mutants

Location Operator Disposition Cause
plugins/instruction-placement/skills/migrate/scripts/cutover-check.sh:420 other productive input-gap

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant