Skip to content

feat: implement issue #1729 — [Phase 3] Collapse the first repo's Class-1 event-driven stubs into agent-ingress.yml and rename the required checks - #1977

Merged
don-petry merged 6 commits into
mainfrom
dev-lead/issue-1729-20260929-1911
Oct 1, 2026
Merged

don-petry merged 6 commits into
mainfrom
dev-lead/issue-1729-20260929-1911

Conversation

@don-petry

@don-petry don-petry commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

[Phase 3] Collapse the first repo's Class-1 event-driven stubs into agent-ingress.yml and rename the required checks

From the issue: As a fleet workflow maintainer, I want collapse the eligible Class-1 event-driven thin-caller stubs in the first target repo into a single agent-ingress.yml and rename the branch-protection required checks to the new per-job names in the same change, so that the first repo demonstrates the ADR-0007 collapse end-to-end with zero dropped triggers and no protection gap, validating the whole toolchain.

Risk

Low — changes automation shell logic under scripts/, covered by shellcheck (--severity=warning) and the bats suite.

Test plan

Tests added/updated: tests/template_stub_drift.bats. Verification: bash scripts/dev-lead-lint.sh (shellcheck --severity=warning) ran pre-commit; the bats suite runs in CI.

Rollback

Revert this PR. No non-revertible side effects (no tags, migrations, or external state).

Monitoring

This PR's Lint (shellcheck) and bats checks show pass/fail; watch subsequent dev-lead / pr-review runs for behavioral regressions.

Refs #1729

Review in cubic

…ss-1 event-driven stubs into agent-ingress.yml and rename the required checks
@chatgpt-codex-connector

This comment has been minimized.

@qodo-code-review

This comment has been minimized.

@coderabbitai

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #1977
No changes were committed, but the PR still can't be marked done: required check SonarCloud is still pending. The retry cron will re-attempt automatically. Next attempt after: 2026-09-29T20:04:21Z

@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but I can't mark it done yet: required check SonarCloud is still pending. I'll re-check automatically.
Next attempt after: 2026-09-29T20:04:21Z

@don-petry
don-petry enabled auto-merge (squash) September 29, 2026 19:34
@don-petry

Copy link
Copy Markdown
Collaborator Author

No description provided.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-29T20:34:43Z.

@don-petry
don-petry disabled auto-merge September 29, 2026 19:35
@codeant-ai

This comment has been minimized.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) September 29, 2026 19:35

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the agent-ingress collapse package for the pilot repository petry-projects/markets and implements a template drift guard exception for reference rows like agent-ingress.yml that are enrolled for coverage but not yet seeded. The review feedback recommends safely guarding nested property accesses in the pr-review job's concurrency group expression to prevent runtime errors, and suggests asserting specific non-zero exit codes in the BATS tests to avoid false positives on unexpected failures.

Comment thread docs/initiatives/agent-ingress-collapse-markets.md
Comment thread tests/template_stub_drift.bats Outdated
@donpetry-bot

donpetry-bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at 89f465979ae823b527a3f06b643c4679195dba4e — click to expand prior review.

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 89f465979ae823b527a3f06b643c4679195dba4e
Review mode: triage-approved (single reviewer)

Summary

Code and package content are sound (AC12 fully done with bats coverage; AC6 package complete; AC11 deferral justified), but the PR body's 'Closes #1729' would wrongly auto-close the story: issue #1729 states it closes only when the companion issue is filed in petry-projects/markets, and this PR's own gap list (§11) records that filing as 'Prepared, not filed'. Metadata-only fix: change 'Closes #1729' to 'Refs #1729' (and ideally list the remaining ACs in the PR body per the issue's budget clause), or file the companion issue before merge.

Linked issue analysis

Issue #1729 scopes four in-repo deliverables: (1) AC6 collapse package — DONE: docs/initiatives/agent-ingress-collapse-markets.md carries the exact ingress content, enumerated eligible set with justified carve-outs (incl. the explicitly-required agent-shield/dependency-audit include-exclude decisions), old→new check-name mapping (§6), skip-billing statement (§7), and the AC8 pre-merge gate + both half-landed rollbacks (§8). (2) AC12 template-drift row — DONE: reference rows get a distinct non-actionable ::notice (never the generic re-seed remedy), with the AC12(c) bats case proving the generic remedy cannot print; verified TEMPLATE_DRIFT_REFERENCE matches the manifest row and seed-repo-template.sh's REFERENCE_MANIFEST/--emit-workflow behavior it describes. (3) AC11 STUB_REGISTRY rows — prepared but not activated, consistent with AC11's own 'When markets collapses:' precondition and the §9c 404 rationale. (4) AC6 second half, filing the companion issue in markets — NOT done (§10/§11: 'Prepared, not filed'). The issue says the story 'closes when the companion issue is filed and the package is complete', so 'Closes #1729' is premature; the issue's budget clause sanctions partial delivery but requires the PR description to 'say plainly which ACs remain', which the body also does not.

Findings

Blocking (metadata-only): PR body uses 'Closes #1729', which will auto-close the story on merge while its stated closure condition (companion issue filed in petry-projects/markets) is unmet per the PR's own §11 gap list. Fix by editing the PR body to 'Refs #1729' (and adding the remaining-ACs note the issue's budget clause asks for), or by filing the companion issue before merge. No code change needed.

Non-blocking: (a) CodeAnt nitpick about '--emit-workflow-only': the phrasing is a compound adjective ('the --emit-workflow-only REFERENCE_MANIFEST' = reachable only via --emit-workflow); the actual flag --emit-workflow exists as described — accurate, at most could be re-worded. (b) run_secret_scanning MCP tool unavailable in this session — noted; gitleaks CI check passed and a manual pattern scan of the diff found nothing. (c) Script changes are pure-logic additions, shellcheck- and bats-covered; the doc is non-executing (the embedded ingress YAML lives inside a fenced block in docs/, not under .github/workflows/).

CI status

All required and advisory checks green at 89f4659: shellcheck, Lint, bats, unit-tests, template-drift, caller-stub-freeze, validate-caller-inputs, validate-ingress-if, actionlint, CodeQL (actions+python), SonarCloud quality gate, gitleaks, AgentShield, holdout-guard all SUCCESS; cubic NEUTRAL; remaining entries SKIPPED by design. No failures.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed, or after a change to the PR body, labels, or linked issues.

@don-petry
don-petry disabled auto-merge September 29, 2026 19:41
@don-petry

Copy link
Copy Markdown
Collaborator Author

Fixed: the comment in scripts/template_stub_drift.sh (reference-rows section) named a nonexistent --emit-workflow-only mode. seed-repo-template.sh only accepts --emit-workflow; I corrected the comment to --emit-workflow and replaced the stray --emit reference with _seed_repo, so it now accurately describes how reference artifacts are reached for hashing versus written into the seeded set.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Acknowledged — this is a Codex usage-limit notice, not a finding on the diff. No code action is required; the PR's substantive review is being handled through the review threads and the other tooling. Noting for the record only.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Acknowledged — this is a Qodo billing/trial-ended notice, not an actionable review finding on this PR. No code change is warranted; recording the acknowledgement only.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Acknowledged — this is a CodeRabbit review-limit/rate-limit notice (no findings were produced this run). No code action is required; the substantive review is covered by the resolved review threads. Recording the acknowledgement only.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Acknowledged — SonarCloud reports the Quality Gate passed for this PR. This is a status notice with no action required.

@donpetry-bot

donpetry-bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at e7e7008b67e30af10f245fa93f0c2d6a347eed89 — click to expand prior review.

Review — fix requested (cycle 2/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: 89f465979ae823b527a3f06b643c4679195dba4e
Review mode: triage-approved (single reviewer)

Summary

Re-review at the same head SHA (89f4659) confirms the triage view of the code — the AC12 drift-guard change and the AC6 collapse package are sound, CI is fully green, and the package's §1 'baseline doc does not exist' claim was independently re-verified (404 on main). But the cycle-1 blocking finding is unaddressed: the PR body still says 'Closes #1729' while the story's own closure condition (companion issue filed in petry-projects/markets) is unmet — a search of markets found no such issue — and the body still does not list the remaining ACs as the issue's budget clause requires. Metadata-only fix: change 'Closes #1729' to 'Refs #1729' and add a remaining-ACs note (or file the companion issue before merge). No code change is needed.

Linked issue analysis

Issue #1729 (delivery brief of 2026-09-23) scopes four in-repo steps. (1) AC6 collapse package — DONE: docs/initiatives/agent-ingress-collapse-markets.md carries the exact markets agent-ingress.yml, the enumerated eligible set with the explicitly-required agent-shield/dependency-audit include-exclude decisions, the old→new check-name mapping with the ruleset observation that none of the 5 roles is required, the kind-(a)-only skip-billing statement, the §8 pre-merge gate + both half-landed rollbacks, and it names (without silently fixing) the two defective pins the brief demands be examined. Note: §1 declines to cite docs/initiatives/agent-ingress-collapse-baseline.md as AC5 directs — verified correct, the file 404s on main, so the package's honest-gap treatment beats citing a nonexistent path. (2) AC12 template-drift reference row — DONE with bats coverage including the AC12(c) case proving the generic re-seed remedy cannot print for a reference row. (3) AC11 STUB_REGISTRY rows — prepared, not activated, consistent with §9c's 404 rationale. (4) AC6 second half, filing the companion issue in markets — NOT done ('Prepared, not filed', §11), and no matching issue exists in petry-projects/markets as of this review. The brief says the story 'closes when the companion issue is filed and the package is complete', so 'Closes #1729' would auto-close it prematurely on merge; the budget clause sanctions stopping early but requires the PR body to 'say plainly which ACs remain', which it still does not.

Findings

Blocking (metadata-only, carried forward from cycle 1): PR body still uses 'Closes #1729' (closingIssuesReferences confirms the auto-close link is active) while the story's closure condition — companion issue filed in petry-projects/markets — is unmet per the package's own §11 gap list and a live search of that repo. Fix by editing the PR body to 'Refs #1729' plus a plain remaining-ACs note (AC6 second half: file the companion issue; AC11 activation; §4 concurrency ruling), or by filing the companion issue before merge. No code change needed; no new commits since the prior review (same head SHA), so nothing else changed.

Non-blocking: (a) CodeAnt's '--emit-workflow-only' nitpick — the phrasing is a compound adjective (reachable only via --emit-workflow); the actual flag exists as described; at most a rewording. (b) run_secret_scanning MCP tool unavailable this session; gitleaks CI passed and the diff carries no secret literals (only ${{ secrets.* }} references inside a fenced docs YAML block). (c) Script change re-verified directly: the ::notice printf's three %s placeholders match its three args; template_drift_is_reference is a pure array-membership check; the MISSING non-reference path is regression-tested.

CI status

All checks green at 89f4659: shellcheck, ShellCheck, Lint, bats, unit-tests, template-drift, caller-stub-freeze, duplicate-decl-gate, sync-scope-guard, holdout-guard, validate-caller-inputs, validate-ingress-if, validate-workflow-schedules, all validate-* checks, actionlint, gh-aw-compile, CodeQL (actions+python), SonarCloud quality gate, Secret scan (gitleaks), AgentShield, Agent Security Scan — SUCCESS. Cubic NEUTRAL; CodeRabbit SUCCESS; dependency-audit ecosystems SKIPPED by design. One 'dev-lead / dispatch' entry shows IN_PROGRESS — that is the dev-lead orchestration reacting to PR events, not a merge gate; a completed run of the same check is SUCCESS. No failures.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed, or after a change to the PR body, labels, or linked issues.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed. Requested items addressed:

  • docs/initiatives/agent-ingress-collapse-markets.md:250 — applied
  • tests/template_stub_drift.bats:179 — applied

@don-petry
don-petry enabled auto-merge (squash) September 29, 2026 19:47
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-09-29T20:48:31Z.

@don-petry
don-petry disabled auto-merge September 29, 2026 19:48
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
- Quality Gate Passed with 0 new issues: no actionable findings (neutral overview)
Files changed: none required
Skipped (informational): 1 (SonarCloud positive report)
```

@don-petry

Copy link
Copy Markdown
Collaborator Author

Acknowledged — SonarCloud reports the Quality Gate passed for this PR (0 new issues, 0 security hotspots, 0 duplication on new code). This is a status notice with no action required; recording the acknowledgement only.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
- Comment `IC_kwDOR9SdIs8AAAABX4Eq7g` (CodeAnt nitpick) already has a `fixed` disposition on an ancestor SHA — left alone (never re-answer my own disposition reply).
- Comment `IC_kwDOR9SdIs8AAAABYXW75A` (new SonarCloud "Quality Gate passed" bot notice) had **no** disposition → posted one `informational` reply.
```
Addressed 1 issue comment:
- Comment IC_kwDOR9SdIs8AAAABYXW75A (SonarCloud Quality Gate passed): informational disposition [bot — harness minimizes]
Review threads: none open
Test verification: n/a — no code changed
Files changed: none
```
Note on the recurring pr-review-agent finding (`Closes #1729` → `Refs #1729`): it is delivered only via our own `pr-review-agent` issue comments (skipped as our automation) with no open review thread and no `CHANGES_REQUESTED`, so it is out of scope for this pass — and editing the PR body isn't something I'll do unprompted.

@donpetry-bot

Copy link
Copy Markdown
Contributor

Automated review — human attention needed

This PR has been through 3 automated review cycles since the last approval or escalation (cap: 3) without converging. Further automated review has been paused to avoid infinite loops.

Please take a look manually, or close this PR if it's no longer needed. To re-engage the automated cascade with a fresh cycle budget, a human should remove the needs-human-review label after reviewing. Re-engagement is intentionally human-gated (#926): mentioning the bot will not reset the cap.

Posted by the donpetry-bot PR-review cascade.

@donpetry-bot donpetry-bot added the needs-human-review Flagged by automated PR review agent label Oct 1, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

dev-lead is withholding action on this item.

It is labeled needs-human-review (flagged for human review — this label is applied by automation as well as by people, so an item can become held without anyone noticing), so dev-lead will not pick it up while that label is present. This notice is posted once so the withhold is visible rather than looking like a stalled run.

To re-enable automated pickup: remove the needs-human-review label.

@don-petry don-petry removed the needs-human-review Flagged by automated PR review agent label Oct 1, 2026
@donpetry-bot

donpetry-bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
Superseded by automated re-review at cde6fcef2c19208397452c289012203f9c1c787a — click to expand prior review.

Review — fix requested (cycle 1/3)

The automated review identified the following issues. Please address each one:

Findings to fix

Automated review — NEEDS HUMAN REVIEW

Risk: MEDIUM
Reviewed commit: cde6fcef2c19208397452c289012203f9c1c787a
Review mode: triage-approved (single reviewer)

Summary

The code, docs and tests are sound and CI is green, but the one blocking finding from the last review is still open. The PR body still says Closes #1729. Merging would auto-close the story, even though its definition of done (a companion issue filed in petry-projects/markets) has not been met. Change it to Refs #1729. This is a PR-body edit only; no code change is needed.

Linked issue analysis

Issue #1729 (OPEN) asks for a reviewable collapse package in this repo plus a companion issue filed in petry-projects/markets. The PR delivers the package: docs/initiatives/agent-ingress-collapse-markets.md (the agent-ingress.yml content, the eligible stub set with justified carve-outs, the mapping from old to new required-check names, and the run-count baseline), the AC12 reference-row carve-out in scripts/template_stub_drift.sh with bats coverage, and the AGENTS.md documentation.

The issue body says: "This story closes when the companion issue is filed and the package is complete — the markets merge is tracked there, not here." AC7 (one observed run per collapsed role) and AC11(c) (a fleet-monitor ALIGNED run) are evidence that must be linked on that companion issue. The package's own gap list says the companion issue is prepared, not filed, and a search of petry-projects/markets found no agent-ingress issue. If Closes #1729 stays, merging closes the story and leaves the remaining post-merge filing step with nothing to drive it.

Findings

Blocking (fix by editing PR metadata only):

  1. Closes #1729 would wrongly auto-close a story that is only partly done (PR body). This was raised in the cycle-3 review at e7e7008 and is still there at cde6fce. Fix: change the PR body to Refs #1729 (or another reference that doesn't close the issue). No code change is needed.

Changes since the last review (e7e7008 → cde6fce): four merges from main (#1980, #1987, #1982, #1983) and no new commits on this branch. The PR's own files are unchanged in substance, and nothing new needs flagging.

Non-blocking notes:

  • Both gemini-code-assist review threads (the docs concurrency-expression comment and the bats exit-code assertion) are resolved.
  • Small wording nit, carried forward and not blocking: the new bats header comment (tests/template_stub_drift.bats) still says --emit-workflow-only REFERENCE_MANIFEST, but the script comment was corrected to --emit-workflow REFERENCE_MANIFEST.
  • template_drift_is_reference is a pure membership check. The MISSING branch now prints a ::notice:: instead of a ::warning:: only for .github/workflows/agent-ingress.yml. DRIFTED handling is unchanged, so the guard still fails on real drift.
  • Secret scan: the run_secret_scanning MCP tool isn't available in this session. The gitleaks CI check passed, and the diff (docs, shell logic and tests) adds no credentials.
  • Risk is MEDIUM because of a modest shell-logic change that the new bats cases cover. No auth, secrets or executing-workflow surface is touched; the workflow YAML appears only inside the initiative doc.
  • Prior automated review cycles reached the cap (3/3), and a human-attention notice was posted.

CI status

Every check passed or was skipped as expected: shellcheck/ShellCheck, bats, unit-tests, Lint, actionlint, CodeQL (actions and python), SonarCloud (Quality Gate passed), gitleaks, AgentShield and Agent Security Scan, template-drift, caller-stub-freeze, check-model-pins, and the validate-* and verify-* suites. Skipped: dependency-audit ecosystem jobs that don't apply here, plus dev-lead ci-relay/resume and dependabot-automerge. The merge state is BLOCKED only because a review is still required.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.

Additional tasks

  1. Resolve all unresolved review thread comments from other reviewers
  2. Ensure all CI checks pass after your changes
  3. Rebase on the target branch if behind
  4. Do NOT modify files unrelated to the findings above

The review cascade will automatically re-review after new commits are pushed, or after a change to the PR body, labels, or linked issues.

@donpetry-bot

Copy link
Copy Markdown
Contributor

No description provided.

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: cde6fcef2c19208397452c289012203f9c1c787a
Review mode: triage-approved (single reviewer)

Summary

The only blocking finding from the prior review is fixed: the PR body now says Refs #1729 instead of Closes #1729, and closingIssuesReferences is empty, so merging will no longer auto-close the story before the markets companion issue is filed. The head is still cde6fce, so the code is the same as last time. That code was already found sound: a small change to the drift-guard shell logic with bats coverage, an AGENTS.md section, and an initiative doc. CI is green and every review thread is resolved.

Linked issue analysis

Issue #1729 asks for a reviewable collapse package plus a companion issue filed in petry-projects/markets. This PR delivers the package: docs/initiatives/agent-ingress-collapse-markets.md (the exact agent-ingress.yml, the eligible set with carve-outs, the old→new required-check name mapping, the baseline, the gate and rollback), the AC12 reference-row carve-out in scripts/template_stub_drift.sh, bats tests, and AGENTS.md docs. The PR now only references #1729 (Refs), so the story stays open until the companion issue is filed. This is the correct scoping.

Findings

Prior blocking finding:

  1. Closes #1729 would have auto-closed a partly done story. RESOLVED. The PR body now says Refs #1729, and GitHub lists no closing issue references.

Changes since the prior review: none. The head SHA is the same (cde6fce); only PR metadata changed.

Non-blocking notes:

  • Wording nit, carried forward: the header comment in tests/template_stub_drift.bats still says --emit-workflow-only REFERENCE_MANIFEST, but the matching script comment was corrected to --emit-workflow. This is cosmetic.
  • template_drift_is_reference is a pure membership check. Only the MISSING branch changes, from ::warning:: to ::notice::, and only for .github/workflows/agent-ingress.yml. DRIFTED handling is unchanged, so the guard still fails on real drift. Bats tests cover both the reference row and a non-reference row.
  • The workflow YAML appears only inside a markdown doc, so no executing workflow is added or changed. No auth or credential handling is touched.
  • Secret scan: the run_secret_scanning MCP tool isn't available in this session. The gitleaks CI check passed, and the diff adds no credentials.
  • Both gemini-code-assist review threads are resolved. There are no unanswered human-reviewer questions.

CI status

Every check passed or was skipped as expected: shellcheck/ShellCheck, bats, unit-tests, Lint, actionlint, CodeQL (actions and python), SonarCloud (Quality Gate passed), gitleaks, AgentShield and Agent Security Scan, template-drift, caller-stub-freeze, check-model-pins, validate-ingress-if, and the validate-* and verify-* suites. Skipped: dependency-audit ecosystem jobs that don't apply here, dev-lead ci-relay/resume, and dependabot-automerge.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.

@donpetry-bot

Copy link
Copy Markdown
Contributor

pr-review approved on PARTIAL advisory evidence: 4/7 required advisory bots reported before the gate's head-age-timeout fallback proceeded. Recorded for the miss-rate metric (#1596).

@don-petry
don-petry merged commit fb99072 into main Oct 1, 2026
65 checks passed
@don-petry
don-petry deleted the dev-lead/issue-1729-20260929-1911 branch October 1, 2026 20:01

@donpetry-bot donpetry-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review — APPROVED ✓

Risk: MEDIUM
Reviewed commit: cde6fcef2c19208397452c289012203f9c1c787a
Review mode: triage-approved (single reviewer)

Summary

This is a confirmation review of head cde6fce (merges from main only since the last substantive commit). The PR adds a "reference row" concept to the template drift guard. A MISSING .github/workflows/agent-ingress.yml now prints a non-actionable ::notice:: instead of the generic "re-seed via seed-repo-template.sh" warning. That warning could never clear, because seed-repo-template.sh deliberately never seeds this file before the ADR-0007 pilot. The PR also documents this in AGENTS.md and adds the markets collapse-package design doc. I agree with the triage verdict. The shell change is small and pure, MISSING stays non-fatal, and only DRIFTED fails the job, as before. Both paths have bats tests: the reference row gets the notice, and non-reference rows still get the re-seed remedy.

Linked issue analysis

The PR uses Refs #1729, and closingIssuesReferences is empty, so merging won't auto-close the story. That is correct here. #1729's main acceptance criteria (the live collapse in the target repo, the branch-protection check rename, and the billed-run comparison) have to happen in the target repo and need an admin step. This PR delivers the in-repo parts: the collapse-package design doc for petry-projects/markets and the drift-guard fix (AC #12) that stops the guard from telling maintainers to hand-seed a live ingress early. Those parts address the story's in-repo scope.

Findings

No blocking findings.

  • Shell logic (scripts/template_stub_drift.sh): template_drift_is_reference is a pure exact-match lookup over a readonly array, and it only changes the message on the MISSING branch. The exit status is unchanged: MISSING was already non-fatal. agent-ingress.yml is enrolled in TEMPLATE_DRIFT_FILES and in seed-repo-template.sh's reference manifest, so the new branch is reachable.
  • Tests: there are 4 new bats cases covering both outcomes of the predicate and both annotation paths, including a regression check that non-reference MISSING rows still show the re-seed remedy. CI bats is green.
  • Design doc: the markets doc is markdown only, and its YAML snippets don't run. They forward secrets only to pinned first-party petry-projects/* reusables. The doc itself flags its open items, the §4 job-level concurrency: ruling and the §5 defective pins, as needing a decision before the real collapse.
  • Review threads: both gemini threads are resolved, the CodeAnt --emit-workflow-only comment nit was fixed in the .sh, and the prior review's Closes → Refs metadata finding is fixed.
  • Nit (non-blocking): the bats header comment still says "--emit-workflow-only REFERENCE_MANIFEST", the same wording CodeAnt flagged in the .sh. It's cosmetic, so it can be fixed in a follow-up.
  • Secret scan (MCP): the run_secret_scanning tool isn't available in this run, so it was skipped. CI gitleaks passed.

CI status

All checks that ran passed (Lint, shellcheck/ShellCheck, bats, unit-tests, actionlint, CodeQL, SonarCloud Quality Gate, gitleaks, template-drift, caller-stub-freeze, validate-*, AgentShield). The rest were skipped because they don't apply, such as the dependency-audit ecosystems and dependabot jobs. None failed or are pending.


Reviewed automatically by the PR-review agent (single-reviewer mode: opus 5.5 [opus 4.8, opus 4.7]). Reply if you need a human review.

don-petry pushed a commit that referenced this pull request Oct 3, 2026
…sha can never verify — comment is never minimized, dev-lead refuses to re-answer, PR blocks permanently (#1977)
don-petry pushed a commit that referenced this pull request Oct 6, 2026
…sha can never verify — comment is never minimized, dev-lead refuses to re-answer, PR blocks permanently (#1977)
don-petry added a commit that referenced this pull request Oct 7, 2026
…sha can never verify — comment is never minimized, dev-lead refuses to re-answer, PR blocks permanently (#1977) (#2051)

* feat: implement issue #2004 — A `fixed` disposition citing the WRONG sha can never verify — comment is never minimized, dev-lead refuses to re-answer, PR blocks permanently (#1977)

* fix(reviews): avoid command substitution in conditionals; align fixed-verification docs with date rule

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(reviews): whole-token matching, uncap fixing-commit search, clarify failed-pass doc

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(bot): clarify date guidance for fixed-verification — must be at or after the finding, not strictly later

* docs: add missing docstrings for bot-comment and fix-reviews functions

Added docstring descriptions for three functions in scripts/dev-lead-fix-reviews.sh that were missing them:
- build_and_run: load a prompt template, substitute variables, and run the writer engine
- resolve_dispositioned_comments: minimize PR issue comments that carry a verified disposition
- handle_rate_limit: post a rate-limit marker on the PR and exit with status 2

This addresses the docstring coverage check which required 80% coverage (was at 75%).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix(reviews): re-read comment body before and after posting a corrected fixed disposition

* fix(reviews): parse live comment body with jq; teach #2004 gh stub the body query

Test-Change-Justification: the shared gh stub in _setup_2004 gained a case for the new live-body query (#2051 review thread PRRT_kwDOR9SdIs6otPR1); no assertion changed.

* fix(reviews): unminimize a RESOLVED comment whose body changed before/after a correction

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(bot): remove out-of-scope docstrings for build_and_run and handle_rate_limit

These generic utility functions are not related to disposition verification
(issue #2004) and should not have docstrings added in this scope.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix(reviews): fail closed on tokenless fixed dispositions; drop generic finding tokens

Tokenless findings now verify only on a commit produced by this pass
(tokenless-not-this-pass otherwise); generic spans are not tokens; the
fixing-commit search stops when a newer commit re-adds the token.

Test-Change-Justification: path-like spans are generic per maintainer decision on PR #2051 review thread PRRT_kwDOR9SdIs6ossVo (#2004 rule 3a); the extraction test no longer expects a file path token.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(bot): strengthen token verification link and test incidental removal

In scripts/lib/comment-disposition-verify.sh, add a comment documenting the
limitation identified by CodeAnt: when a finding has multiple distinct issues
(multiple tokens), the verification accepts a commit that removes only one token,
even if the underlying issues remain. The verification could be strengthened by
requiring all tokens to be removed or by checking that removals are focused on
the finding, not incidental changes.

In tests/dev-lead/unit/test_comment_disposition_verify.bats, add a test case
for incidental token removal in an unrelated change to document the limitation
and provide a test for future strengthening work.

This addresses the medium-risk finding from CodeAnt about strengthening the link
between the diff and the finding.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* fix(reviews): strip diff marker before token match; fix #2004 gh stub; inclusive date wording

- _cdv_diff_side strips the one-char diff marker so a token at column 0 of a
  removed line is not flanked by `-` (Graphite).
- fix-reviews.md: `fixed` date rule reads "at or after" (CodeRabbit).
- test_fix_reviews.bats: the #2004 gh stub returned reviewThreads without
  pageInfo and was shadowed by the comments case, so the #2056 fail-closed
  thread read aborted every #2004 test (red `unit` CI job).

Test-Change-Justification: #2004 stub predates the #2056 fail-closed thread read; it returned a malformed reviewThreads page and was matched first by the comments case, so the tests aborted before exercising the verdict. Only the stub changed, no assertion.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: don-petry <{}+don-petry@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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.

2 participants