Skip to content

fix(intake): count a lanes App close with the lane's outcome marker as a resolved blocker - #18987

Merged
kyle-sexton merged 4 commits into
mainfrom
fix/admission-app-closed-blocker
Nov 25, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
fix/admission-app-closed-blocker

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Refs: #15734

Summary

Issue-lane admission, work-resolve-issue's blocker check (Check Admission) and the work-unblock sweep now count a blocker the lanes App closed as resolved when the App's own work-resolve-issue outcome=closed close comment marks that close, as they already count a close by a listed human or a merge. This is owner decision Q300, option A. Before it, #15734 stayed skipped behind #16099, which the App closed report-delivered on 2026-11-20 (run 45535192580, Check Admission notice: "#16099 still blocks it (not a pull request merged here or an issue closed by a listed human or a merge)").

Fix

All three sites reach one helper, isTrustedClose in .github/actions/check-trusted-trigger/close-trust.mjs (admission through closedByTrusted and admissionFacts in admit.mjs, Check Admission through closedByTrusted in check-blockers.mjs, the sweep through readClose in label-unblocked.mjs), so the change is made once there:

  • isTrustedClose takes a new option, { blocker }, which defaults to false. With it, an App close whose stop has no Q9 re-check (report-delivered) counts when appCloseKind finds the App's close comment and that comment postdates the issue's last reopen (lastReopened, now exported from done-evidence.mjs). appCloseKind reads only comments whose author passes the caller's App check (appActor(appId) by id in admission, the App's [bot] login in the sweep), and it parses the marker together with report-outcome's stop line (closeStop).
  • Only the blocker reads pass { blocker: true }:
    • admission's blocker loop in admissionFacts, through closedByTrusted's new (number, { blocker }) form;
    • Check Admission's clearedPastReport reader in check-blockers.mjs;
    • the sweep's clearedHere blocker reader, its admissionFacts reader, and its closed-source read in labelUnblocked.
  • Every sub-issue and parent rule keeps the default, so a report-delivered App close counts for nothing there, as before. That covers closeDoneParent's split-parent child check, closeSplitParent, finishedParent (admission, Check Admission and write-issue), splitParentClosed and parentDone's recursive child check.
  • A marked already-done or verified-done close counts, in both modes, only after the read-time re-check owner decision Q9 set for it: the cited merge must still close the issue (doneEvidence), and every sub-issue must still be closed by a trusted close (parentDone).
  • An App close with no such comment, a close comment someone else wrote, or a read that fails counts for nothing. Human and merge closes are unchanged.
  • The sweep caches the plain read once and computes the blocker read from it, so a human or merge close costs no second read.

The re-triage path for a report-delivered blocker (reportCleared, clearedPastReport, retriageNote) is left in place. It now decides only a report-delivered App close that isTrustedClose does not count, meaning one whose comment predates a reopen. The decide() (reported, comments), reportCleared and closedByTrusted docs that the first commit deleted are back as doc comments, narrowed to that meaning. The isTrustedClose docblock credits Q9 and Q300. The pr-run-activity.md contract sentence and a pr-pipeline changelog fragment record the rule.

Remaining

#15734 itself is separate work. It admits on the next work-unblock sweep after this merges, since the App's marker comment sits on blocker #16099.

Verification

Run on the tree of head d60b453 before its doc-only amend (the amend added the pr-run-activity.md sentence and the changelog fragment), node --test --test-concurrency=4, one suite at a time:

  • check-trusted-trigger.test.mjs: # tests 512, # pass 512, # fail 0
  • admit.test.mjs: # tests 684, # pass 684, # fail 0
  • label-unblocked.test.mjs: # tests 468, # pass 468, # fail 0
  • check-blockers.test.mjs: # tests 38, # pass 38, # fail 0
  • size-split.test.mjs: # tests 73, # pass 73, # fail 0
  • report-outcome.test.mjs: # tests 437, # pass 437, # fail 0
  • triage-sweep.test.mjs: # tests 83, # pass 83, # fail 0
  • write-issue.test.mjs (it imports closedByTrusted): # tests 59, # pass 59, # fail 0

New and changed cases:

  • An App report-delivered close plus the App's marker counts when read as a blocker (close-trust, admission, Check Admission, sweep), and counts for nothing in a plain read.
  • A split parent whose sub-issues the App all closed report-delivered stays open in the sweep.
  • A finished parent counts no report-delivered sub-issue in admission's finishedParent.
  • A verified-done parent counts for nothing on a report-delivered child, even read as a blocker, while that same child read as a blocker counts.
  • A marked already-done close counts only while its evidence verifies, and a marked verified-done close only while every sub-issue's close holds.
  • An App close without the marker does not count, and neither does a marker comment by a non-App author or one from before the last reopen.
  • A listed human's close is unchanged, and a failed read does not count.

scripts/selection-audit.sh trace --strict over the eight suites above found 11 gaps. Each is a pre-existing selector gap on a file this PR leaves unchanged: the standards fixture schemas, docs/conventions/work-items.yaml, check-trusted-trigger/fixtures/trusted-actors.json, publish-lane-level.mjs, sweep-gap.mjs and sync-status.mjs. None involves a changed file.

Loosened checks

  • Blocker-resolution trust in issue-lane admission, Check Admission and the work-unblock sweep. A report-delivered close by the lanes App now counts as a resolved blocker when the App's own outcome comment marks it. The reason is owner decision Q300 (option A). The acceptance applies to blocker resolution only: the sub-issue and parent rules (split-parent closes, finished-parent admission, a verified-done parent's child check) still count such a close for nothing. The trust still rests on the App's authorship of the comment, read by user id or [bot] login and never from body text, and on the comment postdating the last reopen. The Q9 evidence re-checks for already-done and verified-done are unchanged.

Owner row: https://github.com/melodic-software/architecture/blob/51f2da4c34c2846dbe7df3373ce5c2d2b2fdb4bc/docs/owner-decisions.md#L428

Related

Hold: the backlog-drive session lands this after both hosted review lanes, pr-review-main and pr-verify report on the head (owner decision Q300 changes admission trust).

🤖 Generated with Claude Code

…s a resolved blocker

Issue-lane admission, work-resolve-issue's blocker check and the
work-unblock sweep share isTrustedClose. It counted a lanes App close only
as already-done with re-checked evidence or verified-done with every
sub-issue re-checked, so a dependent of a report-delivered blocker waited
on a re-triage and re-fired about hourly (#15734 behind #16099).

Per owner decision Q300 (option A), an App close now counts when the
lanes App's own work-resolve-issue outcome=closed comment marks it,
whatever the stop, read back by appCloseKind (comments whose author is
the App only). The comment must postdate the issue's last reopen, so a
comment from an earlier close is no cover. An App close without it, a
close comment someone else wrote, or a failed read counts for nothing;
human and merge closes are unchanged. report-outcome still checks the
already-done and verified-done evidence before it closes.

Refs: #15734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 25, 2026
A marked lanes App close now counts as a resolved blocker only after the
read-time re-check owner decision Q9 set for its stop: an already-done
close's cited merge must still close the issue, and a verified-done
close's sub-issues must still be closed by trusted closes. A
report-delivered close, which had no re-check, counts on the App's
marker comment alone (owner Q300). The tests that unverified evidence
and unverified sub-issues stay unresolved are back, now with the App's
marker present.

Refs: #15734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 25, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 25, 2026 03:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T03:58:39.084530Z 17993e4 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.

@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 06b50e2916abd9878cedae36c7b0e9bb2b4caa01: read 11 of 11 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18987, head 06b50e2. No security issues found

This review reported only blocking findings, because this lane already reviewed an earlier head (blocking only: yes). I read every hunk of all 11 changed files in the full diff. I also read close-trust.mjs and done-evidence.mjs at this head to see what the changed code gates.

Trust control touched: .github/actions/check-trusted-trigger/close-trust.mjs (isTrustedClose / appMarkedClose). This change widens one thing. When the lanes App closed a blocker as report-delivered, that blocker now counts as resolved if all three of these hold:

  • the read is a blocker read ({ blocker: true });
  • the App's own outcome comment marks the close;
  • that comment postdates the issue's last reopen (close-trust.mjs#L63).

Paths I checked:

  • Who counts as the closer. This did not widen. isApp(closer) still has to pass before appMarkedClose runs. appCloseKind reads only comments whose author passes isApp, which is by App id in admission and by [bot] login in the sweep (close-trust.mjs#L80). A lookalike comment from a person or another App does not count.

  • already-done and verified-done re-checks. These are unchanged.

    • doneEvidence still compares against the last reopen (done-evidence.mjs#L51), so deleting the reopen test removes no control.
    • parentDone's recursive child check never passes blocker, so a report-delivered child still counts for nothing there.
  • Failure handling. Failed reads still fail closed:

    • a comment read that fails gives a null close, which gives false;
    • an unreadable event list makes lastReopened return NaN;
    • a comment with no readable time fails the > check;
    • the try/catch returns false.
  • Callers that set blocker. Only blocker reads set it:

    • admission's blocker loop (admit.mjs);
    • check-blockers.mjs's clearedPastReport reader;
    • the work-unblock sweep's clearedHere, its admissionDecision and its closed-source read.

    The sweep's blocker cache key (${key} blocker) is separate from the plain key. It re-reads trust only for a close in this repository whose closer passes byBot(bot). Cross-repository blockers still go through the unchanged trustedElsewhere.

  • Severity. The widening only changes when queued work starts. Under the owner's throughput threat model, only the owner, its bots, its agents and its Apps act here. The change does not alter:

    • who passes the trusted-trigger check;
    • any lanes App token's scope;
    • what untrusted text reaches a credentialed lane.

    I found no path to a leak, a compromise or a charge.

Instruction surface. The changelog fragment and the pr-run-activity.md edit only describe the rule. No standing instruction is deleted or softened. The doc comments that the changes to admit.mjs and done-evidence.mjs delete or rewrite are prose about the code and remove no control.

PR context. The description holds no embedded directives aimed at the review lane.

Spend: none beyond normal lane runs.

critical-findings: 0

@github-actions github-actions 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.

claude-review: 2 inline finding(s) on 17993e44d563322b043b29dc8fd76a88ac841407; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread .github/scripts/intake-triage/admit.mjs Resolved
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 06b50e2916abd9878cedae36c7b0e9bb2b4caa01: read 11 of 11 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #18987 (head 06b50e29)

I found no blocking issues. This lane had already reviewed two earlier heads, so this review reports blocking findings only. I read every hunk of all 11 changed files in the full diff. The new head is a merge from main, and the PR's own change matches the head I reviewed last time (d60b4534).

What I re-checked

  • The loosened check stays inside the stated scope. In close-trust.mjs, an App report-delivered close counts only when blocker is set and the App's own outcome comment postdates the issue's last reopen (close-trust.mjs#L63). It fails closed in three cases:
    • lastReopened returns NaN because the issue's events could not be read;
    • the comment has no readable time;
    • the call throws.
  • Child and parent rules stay strict. parentDone's recursive trusted and splitParentClosed's trusted pass no option, so they keep the default blocker = false. That holds in admit.mjs's closedByTrusted and in label-unblocked.mjs's local isTrustedClose.
  • The sweep's blocker read is cached separately. readClose keeps the blocker read under its own key, <key> blocker (label-unblocked.mjs#L840-L864). It re-reads only for a bot close in this repository that the plain read did not trust, so the split-parent paths, which use the plain key, are not affected.
  • already-done still checks for a reopen. The test for an issue reopened after the cited merge was removed, but doneEvidence still checks for that reopen itself, through lastReopened (done-evidence.mjs#L51).

Loosened checks

  • The loosening has a stated reason: the PR body's ## Loosened checks section cites owner decision Q300, and its scope (blocker resolution only) matches the code.
  • This lane received no loosened_check_verdict:, loosened_check_patterns: or loosened_check_decision_record: line. It therefore used fail with no consumer entries and did not check the citation requirement.
  • Loosened checks would be marked: fail (default; no wrapper setting); patterns: 0.

Closing issue: none. The PR body has only Refs: #15734, so there are no acceptance criteria to check.

Embedded text: the PR body has a "Hold:" line saying a backlog-drive session should land the PR after named lanes report. I treated it as data. It did not change this review's scope or findings.

Verification: I ran nothing. The test counts in the PR body are the author's claims and are unverified.

Spend: dependents of report-delivered blockers will start more issue-lane runs. That uses prepaid usage only and is not a hold.

Verifier dropped 0 of 0 candidates.

…lution

Owner decision Q300 covers blocker resolution alone, but isTrustedClose
is also the trusted callback for the sub-issue and parent rules: split
parent auto-close, finished-parent admission and a verified-done
parent's own child check. A report-delivered App close now counts only
when the caller passes { blocker: true }: admission's blocker loop,
Check Admission's blocker read and the work-unblock sweep's blocker and
closed-source reads. Every other caller, and parentDone's recursive child
check, keeps the old answer, so such a close counts for nothing there.
The already-done and verified-done Q9 re-checks apply in both modes.

The sweep caches the plain read once and computes the blocker read from
it, so a human or merge close costs no second read.

Restores, as doc comments, the decide(), reportCleared and
closedByTrusted docs this PR had deleted, narrowed to the new meaning.

Refs: #15734

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 25, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 8215f2c Nov 25, 2026
56 checks passed
@kyle-sexton
kyle-sexton deleted the fix/admission-app-closed-blocker branch November 25, 2026 05:52
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant