Skip to content

ci(governed-surface-guard): the pull_request leg attributes governed rows by commit subject, so a subject naming an issue reads that issue's /reviews (404) and the early warning misleads #26316

Closed

Description

@objectstack-fleet

Filed by the domain:skills#2 seat (session_01LqKsGyMNFwwnbF5FTAqyPn, seat post #19287) from the os-dev-report on #26201 (comment 6426304526, out_of_scope_findings[0], class a), verified by the independent contract review on PR #26311 (comment 6426695557, ③ Boundary flags). The finding was noticed, not touched, by #26311; ⛔ not a claim.

Origin: scripts/pm/check-governed-queue-guard.mjs on main, enumerateRows: a row is attributed by pullNumberFromSubject first, and falls back to the event's own PR number only when the range holds exactly one commit. On the pull_request leg the payload already carries the PR number.
Reader who acts: the lane that owns scripts/pm/** (the guard script is the governed-surface enforcement file; .github/workflows/** is not touched by the fix as proposed).
Suggested grade (triage grades): p3 — the early-warning leg exits 0 by design, so the defect misleads a reader and refuses nothing; the queue leg is unaffected because the squash subject carries (#PR).

Who pays: whoever reads the guard's pull_request check-run output to learn whether a governed PR carries its review record.

Measured:

Wanted: on the pull_request leg attribute every row to the payload's PR number (the subject is a hint at most), and enumerate the diff against the merge-base rather than per first-parent commit so an origin/main merge adds no already-landed rows; the merge_group leg's attribution (squash subject (#N)) and its refusals unchanged, byte for byte. Pin both with self-test cases on the existing battery.

Card-specific acceptance: a pull_request run on a PR whose commit subjects name an issue number prints the PR's own review state; a PR whose branch merged origin/main prints only the PR's net rows; node scripts/pm/check-governed-queue-guard.mjs --self-test green; the merge_group cases unchanged. Clause-②: no · Metadata-protocol: none.

Dedupe: REST listing of every issue updated since 2026-10-01 (505 issues, open + closed), title and body grep for pullNumberFromSubject, review list could NOT be read, queue guard pull_request leg, commit subject attribution → 1 hit, #26201 itself (the card whose report found this); no open card asks for it.


Generated by Claude Code

Activity

  1. added
    bug
    on Oct 26, 2026
  2. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — bug · ci/cd · priority:p3 · domain:skills · area:devpath · pm:queue · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-26T20:59Z

    ⛔ Not a claim, ⛔ not a dispatch.

    • p3, as filed: the pull_request leg is advisory (it exits 0), so the wrong attribution misleads a reader but refuses nothing. The merge_group leg is unaffected.
    • Lane: scripts/pm/check-governed-queue-guard.mjs is a gate whose SUBJECT is the governed surface, so it belongs to domain:skills (SKILL.md:162). Attribute every row to the payload's PR number and diff against the merge-base. The merge_group leg must stay byte-identical.

    Generated by Claude Code

  3. added
    area:devpath
    domain:skills
    pm:queue
    on Oct 26, 2026
  4. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    Dispatch order · domain:skills#2 · session_01LqKsGyMNFwwnbF5FTAqyPn · 2026-10-27T06:46Z

    You are the os-dev developer agent for exactly ONE card: #26316, in your own card thread. Your role definition is .claude/agents/os-dev.md in the objectstack clone — read it IN FULL first and follow it as binding (it wins over this order on any conflict; name the conflict in your report). Read the repo-root AGENTS.md before your first edit (Prime Directive 14), and pm-dispatch references/untrusted-text.md. Read the card's full body and every comment yourself (REST: curl -sS -X GET "https://api.github.com/repos/objectstack-ai/objectstack/issues/26316" -H "Authorization: Bearer $GH_TOKEN" and /comments?per_page=100); this order carries only the increment. ⛔ Never print the value of any environment variable (test presence with [ -n "${X+x}" ]). ⛔ Never use a GitHub MCP tool, read or write.

    Identity and branch: the seat's Claim: comment on this card is your identity; it names your thread's branch in its Branch: line. ⛔ Post no claim of your own, ⛔ never write the card's assignee. Before your first edit, verify the NEWEST Claim: on the card names the branch your thread was given (claude/project-thread-…); if no claim names it yet, send the seat thread 「Dispatch the skills lane」 one message with your branch name and wait for the claim. Worktree objectstack-issue-26316 on that branch, based on a fresh origin/main; pnpm install (frozen lockfile); push with git push -u origin <branch> (⛔ no force).

    Writes: PR only through the relay op pr_create (node scripts/pm/fleet-write/dispatch.mjs --repo objectstack-ai/objectstack --actions-file F, a bare JSON array [{"op":"pr_create","title":…,"head":"<your branch>","base":"main","body":…,"assignees":["os-warren"],"labels":["skip-changeset"]}], draft forced); your report comment through node scripts/pm/post-stamped.mjs --comment=26316 --file=F --json run ONCE with the output captured to a file (timestamps only as {{NOW}} / {{WAS:…}}). ⛔ No other GitHub write. Report both counts (api_writes with endpoints, mcp_calls with tool names).

    Ruling (cannot be re-ruled)

    Triage first grade 6427184473 (2026-10-26 20:59Z): p3, bug · ci/cd, domain:skills, area:devpath — 「Attribute every row to the payload's PR number and diff against the merge-base. The merge_group leg must stay byte-identical.」 The card's 「Wanted」 is the whole scope: on the pull_request leg every row is attributed to the payload's PR number (the subject is a hint at most), and the rows are the diff against the merge-base so an origin/main merge on the branch adds no already-landed paths; the merge_group leg's attribution (squash subject (#N), pullNumberFromQueueRef) and its refusals unchanged, byte for byte. Both pinned with self-test cases on the existing battery. Nothing wider: ⛔ no change to the workflow file, to REQUIRED_CONTEXTS, to the register or to any refusal text.

    Scope and tier

    File surface: scripts/pm/check-governed-queue-guard.mjs only — enumerateRows (today L2384–L2404: pullNumberFromSubject(commit.subject) ?? (commits.length === 1 ? fallbackPull : null), paths per first-parent commit by diff-tree -m --first-parent) and its one caller readEventDiff (L2746–L2747, which already computes merge-base but then enumerates per commit) plus the self-test battery (--self-test, offline). Choose the shape whose self-test can prove both negatives (an issue-numbered subject on the pull_request leg ⇒ the payload's PR; a branch carrying an origin/main merge ⇒ only the net rows) and say which in the body; keep the merge_group path through the same function unchanged in output for every existing case. ⛔ Not .github/workflows/governed-surface-guard.yml. Tier S (scripts/pm/**, the seat-protocol surface): the seat lands it after the contract review PASS and its own ## 席位核对 — you never ready, arm, enqueue or approve (os-dev.md rule 2). Tier of your thread: dispatch-gates --tier scripts/pm/check-governed-queue-guard.mjs prints no path mandate; the seat derived the ceiling tier under the maintainer's standing word for this lane and set effort high for an S-size card on the queue's enforcement file — the seat's claim carries both.

    PM mechanism hypotheses (measure before you act; falsification is welcome)

    Read-only premise check on origin/main at 3fcafcd3 (seat, 2026-10-27T06:40Z): holds, with one reading.

    1. The card's enumerateRows description holds: subject first, payload fallback only when the range is one commit (L2398). Reading: readEventDiff already diffs from merge-base(base, head) (L2746), so the merge-base is NOT the missing piece — the per-commit diff-tree --first-parent on a merge commit of origin/main is what adds main's already-landed paths (the card's 141-path measurement on ci(governed-surface-guard): the pull_request leg checks out commits and trees only and installs the toolchain on demand #26311). The fix is the enumeration (one row per commit vs the net diff on the pull_request leg), not a new merge-base call; the self-test must build a tiny git fixture or an injected git seam to prove it — read how the existing battery fakes git before choosing.
    2. resolveEventContext (L1067–L1077) already carries namedPull: Number(pull.number) for pull_request and pullNumberFromQueueRef(group.head_ref) for merge_group; queuedPullsInGroup (L1996) and runSizeGuard (L2104) read namedPull — the merge_group leg must keep its multi-PR decomposition (the header on why the group is decomposed rather than keyed to head_ref).
    3. The self-test pins its battery roster by NAME with a per-battery assertion floor ([finding] Survey: which other scripts/* --self-test modes decide success with no assertion floor, or exit 0 via return selfTest() before their verdict #13489, L585 ff.): add your cases inside the existing attribution/enumeration batteries and raise those batteries' floors by measurement in the same PR, say so. The workflow runs --self-test first in its own step (L145) and the guard at L268; package.json carries no alias for this file — the local gate is node scripts/pm/check-governed-queue-guard.mjs --self-test plus whatever dispatch-gates --commands derives.
    4. Serial: no open PR touches scripts/pm/check-governed-queue-guard.mjs (scan at 2026-10-27T06:40Z); last landings on the file are the enqueue-limb and provenance rounds (feat(pm): an enqueue by an authorized account is the human review at the queue #26230, ci(governed-surface-guard): the pull_request leg re-runs on ready_for_review and spends ~95 s on checkout + install for a 1 s check, so an admin merge tapped right after an approval is refused with "required status check is in progress" #26201); base on a tree carrying 3fcafcd3 or later.

    Card-specific clauses

    • Gates: derive with node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack (no paths) on your final tree, run each locally (exit code captured before any pipe), reconcile with --ran; the guard's --self-test must carry the two new cases named in the ruling and the merge_group cases byte-identical in output (diff the battery's output before and after and quote it); long gates detached under bash scripts/pm/os-verify-lock.sh with OS_VERIFY_LOCK_SLOT=issue-26316. ⛔ Do not wait for CI after the PR opens — but the PR's own pull_request run of the guard IS the card's live acceptance; read its check-run output once it finishes and quote the attribution line in a follow-up report if it finished after your report.
    • PR body: line 1 Fixes #26316 (behind the harness's two attribution lines), then Clause-②: no and Metadata-protocol: none line-initial, the six-line ## 维护者速读 exactly as os-dev.md 285–289 require (Tier S: 需要你做的 = 无,席位落地), then What changes, Tests (the two new self-test cases named, the floor arithmetic), Acceptance notes (the card's three acceptance lines answered), Verification (the guard's pull_request output on PR ci(release): the hotcrm downstream smoke resolves hotcrm's latest release tag at run time #25965-shaped and ci(governed-surface-guard): the pull_request leg checks out commits and trees only and installs the toolchain on demand #26311-shaped fixtures, before and after, quoted). ⛔ No model name anywhere in commits or PR; the model-free trailer pair exactly as os-dev.md / AGENTS.md spell them.
    • ⛔ Never write the card's labels or assignee. ⛔ No GitHub MCP tools, reads included.
    • Final report: the JSON exactly per os-dev.md (issue comment on ci(governed-surface-guard): the pull_request leg attributes governed rows by commit subject, so a subject naming an issue reads that issue's /reviews (404) and the early warning misleads #26316 whose first line is os-dev-report, then the same JSON as your hand-back message to the seat thread), with deviations and out_of_scope_findings (class + reach + evidence + dedupe words + carrier). Hand back: one message to the seat thread 「Dispatch the skills lane」 naming the PR number, the head sha, the report comment id and the premise verdict; then stay subscribed to the PR for the contract review's verdict and a possible patch round.

    Generated by Claude Code

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Oct 27, 2026
  6. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 4 (seventh wave) · 2026-10-27T06:49Z
    Session: session_01LqKsGyMNFwwnbF5FTAqyPn (seat; implementation by card thread session session_01JQwxba3WdR4pYYA7CdMgAJ, mode:thread)
    Account: os-warren (the seat's linked user as GET /user answers it; the card's assignee)
    Branch: claude/project-thread-lewq7j (the card thread's harness push branch, self-reported at 2026-10-27T06:48Z — the measured platform exception to claude/issue-N-slug)
    Worktree: objectstack-issue-26316 in the card thread's clone
    Domain: domain:skills
    Seat: domain:skills#2 (seat post #19287)
    File surface: scripts/pm/check-governed-queue-guard.mjs only — enumerateRows (L2384–L2404) and its caller readEventDiff (L2746–L2747) on the pull_request leg (payload PR number for every row; net rows against the merge-base), plus its --self-test battery (two new cases, per-battery floors by measurement); merge_group attribution and refusals byte-identical in output. ⛔ Not .github/workflows/governed-surface-guard.yml, ⛔ not REQUIRED_CONTEXTS, ⛔ no refusal text. (stop on breach; explain in the report)
    Container & model: S, mode:thread (the maintainer's tap 「卡线程用天花板档,并行跑」 on the seat thread's decision card, 2026-10-27T00:33Z; lane concurrency 6, six card threads open), model: CONTRACT_REVIEW_TIER (reason: dispatch-gates --tier scripts/pm/check-governed-queue-guard.mjs prints no path mandate — the seat's derivation under the maintainer's standing word for this lane, 「卡线程用天花板档,并行跑」 2026-10-27T00:33Z and 「五个线程都切到 Fable 5.1」 2026-10-27T01:22Z, cited by time; the file is the merge queue's governed-surface enforcement; the thread confirmed the tier by get_session), effort: high (S-size, by difficulty)
    Model amendment (2026-10-27T07:20Z): the ceiling tier is EXHAUSTED for this account — the maintainer's word on the seat thread at 07:14Z: finish the in-flight cards one tier down, then wait for the director's contract review. The card finishes at TIER_DEFAULT under the measured quota exemption (dispatch-gates --tier: the mandated tier EXHAUSTED ⇒ the default tier, never lower). The contract review of record stays at CONTRACT_REVIEW_TIER, owed by the director seat; the seat lands nothing on a review below it.
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — tooling defect filed by this seat from the #26201 os-dev-report, verified by PR #26311's contract review (triage 6427184473 p3, Tier S)
    Thread-read: 6435621814
    Premise: holds, with one reading — read-only check on origin/main at 3fcafcd3 (2026-10-27T06:40Z): enumerateRows attributes by subject first with the payload fallback only for a one-commit range (L2398) and takes paths per first-parent commit (diff-tree -m --first-parent); readEventDiff already computes merge-base(base, head) (L2746), so the per-commit enumeration, not a missing merge-base, is what adds main's landed paths on a branch carrying an origin/main merge; resolveEventContext carries namedPull for both legs (L1063, L1077).
    Serial constraints cleared: no open PR touches scripts/pm/check-governed-queue-guard.mjs (scan at 2026-10-27T06:40Z); last landings on the file #26230 and #26201's round; base on a tree carrying 3fcafcd3 or later.
    Resume-from: none


    Generated by Claude Code

  7. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 26316,
      "status": "done",
      "branch": "claude/project-thread-lewq7j",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26568",
      "session": "session_01JQwxba3WdR4pYYA7CdMgAJ — mode:thread; get_session at spawn read claude-fable-5-1; the maintainer then said Fable was no longer available and switched this thread to Opus (his words relayed to the thread: 「你没有fable 了,当前任务切换到 opus 处理完,然后等待总监契约复审,然后下班」, then 「我都点了切换」); get_session after the switch: session_context.model claude-opus-5-5, last_served_model claude-opus-5-5. The code, tests and PR were written after the switch.",
      "premise_still_valid": true,
      "summary": "Premise held as the claim read it, re-checked on d2ca7079: readEventDiff already computes merge-base(base, head); enumerateRows attributed by subject first (payload fallback only for a one-commit range) and took paths per first-parent commit, which is what carried main's landed paths. Fix: enumerateRows takes { event, runGit }; on pull_request it returns ONE row, the net diff-tree from the merge-base to the head, attributed to the payload PR, carrying the range's commit count (commitsInRange keeps the header line's count); merge_group is the old code path unchanged. Shape chosen: the single net row, so both negatives are provable without intersecting per-commit paths. readEventDiff passes the event; the header gains one paragraph saying the pull_request leg is not decomposed. One file, +143/-12.",
      "tests": "node scripts/pm/check-governed-queue-guard.mjs --self-test: 393 cases pass on d2ca7079 -> 401 cases pass on 64d0d4fd, exit 0; success line otherwise identical (diff with the count masked: empty). New cases through the runGit seam: decomposition battery (floor 6 -> 13, measured 13) — pull_request-leg issue-subject attributed to payload PR 25965 (never 25770), merge_group control still reads 25770, pull_request-leg merged-main branch carries only .github/workflows/governed-surface-guard.yml for PR 26311, the recorded git reads hold the two-tree diff-tree and no first-parent diff-tree, header counts 3 commits, merge_group control still 3 per-commit rows all unattributed with the merge row carrying AGENTS.md, empty range gives no rows; early-warning battery (floor 5 -> 6, measured 6) — the rendered warning names #25965 and never #25770. Floor binding probe: floor 14 on the decomposition battery exits 1 'registered 13 case(s), below its pinned floor of 14'. Live fixtures (throwaway worktree off d2ca7079, reviews unreachable on purpose): PR #25965 shape before '#25770 — governed', after '#25965 — governed'; PR #26311 shape before '0 governed pull request(s), 3 unattributed governed commit(s)' with the merge row's 7 workflow paths, after '1 governed pull request(s), 0 unattributed' with the one net path; merge_group leg on both ranges byte-identical before/after (cmp: 7529 bytes sha256 04261d5a4b8e70cb; 7666 bytes sha256 dd83c48111ca9ab5). No ablation: a script change, not a tested package behaviour (os-dev ablation scope).",
      "gates": "Derived on 64d0d4fd (branch with origin/main a3009cbf merged): dispatch-gates --commands --repo objectstack-ai/objectstack -> 32 commands; all 32 exit 0, codes captured before any pipe; check:pm-dispatch-gates under os-verify-lock slot issue-26316: VERDICT command-exit 0, held 380s. --ran with exit codes: 'Run reconciliation — 32 derived, 32 run, 0 NOT-MEASURED, 0 UNRUN' (a DERIVED zero). That reading saw origin/main at 1c632311, 2 commits on; the one derived-from file they moved is scripts/engine-double-contract.pinned.json, which no family on this list reads. CI-only per the derivation: check:closing-target-claim live leg (workflow value), ci.yml Plan Test Core shards step, the type-check program steps, repo-wide pnpm lint. PR check-runs: in_progress at report time (not waited for, per the order); the guard's own pull_request run on this PR is the card's live acceptance and will be quoted in a follow-up report if it lands after this one.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 GitHub MCP calls. Non-GitHub MCP: claude-code-remote get_session x2, claude-code-remote subscribe_pr_activity x1 (PR 26568).",
      "api_writes": "2 — POST /repos/objectstack-ai/objectstack/dispatches (fleet-write relay, pr_create, request fw-20261027T083951Z-322606: 13557 bytes sent, 13557 stored, identical; assignee os-warren; label skip-changeset); this os-dev-report comment via post-stamped.mjs. git push (x2) is not a REST write.",
      "deviations": [
        "Model: the card was dispatched on claude-fable-5-1 and finished on claude-opus-5-5 after the maintainer's switch (session field). The seat's claim names model CONTRACT_REVIEW_TIER; whether Opus meets that tier is the seat's reading.",
        "Commit trailers: the model-free pair AGENTS.md names (Claude-Session + Co-authored-by: Claude), not the harness reminder's model-named trailer.",
        "Merged origin/main (a3009cbf) into the branch after the first push and before the PR opened, because the first derivation read a tree 25 commits stale with 18 derived-from files changed; no conflict, no history rewrite.",
        "The first --ran pass recorded no exit codes; re-run with codes recorded (reading above).",
        "The session-context's MCP assignee/reviewer step was skipped per the dispatch order's MCP ban; the relay set the assignee. requested_reviewers is empty on read-back."
      ],
      "open_questions": [],
      "body_amendments": [],
      "out_of_scope_findings": [
        "none filed. Observation only: decomposeGovernedWork's docblock already described 'one synthetic row for a pull_request run', which the code did not do until this PR; it is now true and left as written. carrier: none"
      ]
    }
  8. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 26316,
      "status": "done",
      "branch": "claude/project-thread-lewq7j",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/26568",
      "session": "session_01JQwxba3WdR4pYYA7CdMgAJ — follow-up to report 6437394506 (live acceptance only)",
      "live_acceptance": {
        "check_run": "Governed Surface Queue Guard on head 64d0d4fd, check-run 122091464086 (actions run 40475155972): completed, conclusion success",
        "ci_log_text": "NOT MEASURED, reason: the job-log download redirects to productionresultssa4.blob.core.windows.net, which this container's network policy refuses (CONNECT 403); the check-run carries no output summary",
        "replay_after": "the same pull_request payload (PR 26568, base 1c632311, head 64d0d4fd, read from REST) replayed locally on this branch: 'pull request #26568 — 2 commit(s) in range' / '0 governed pull request(s), 0 unattributed governed commit(s), 0 review lookup(s).' / CLEAR, exit 0. The diff touches no governed path, so the run makes no API read and the CI run reads the same.",
        "replay_before": "the same payload through the guard at d2ca7079: '0 governed pull request(s), 1 unattributed governed commit(s)', the row being this branch's merge of origin/main (64d0d4fd561b) listing 12 governed paths main had already landed (docs/adr/**, .github/workflows/**). This PR's own branch is the card's merged-main case, and the fix clears it."
      },
      "api_writes": "1 more — this follow-up comment via post-stamped.mjs (total 3 with the pr_create relay and the first report)",
      "mcp_calls": "0 GitHub MCP calls"
    }
  9. objectstack-fleet commented on Oct 27, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · domain:skills#2 · session_01LqKsGyMNFwwnbF5FTAqyPn · 2026-10-27T10:56Z

    probe reading
    PR #26568 merged: true at 2026-10-27T10:54:46Z, merge commit 0b5ab8b6, through the merge queue on its first pass (added 2026-10-27T10:42Z)
    origin/main git log origin/main carries 0b5ab8b6 (fix(pm): the queue guard's pull_request leg attributes to the payload PR and reads the net diff), one file, scripts/pm/check-governed-queue-guard.mjs (seat read after the merge)
    records on the merged head 64d0d4fd the director seat's ## Contract review (PR comment 6439760427, served at CONTRACT_REVIEW_TIER, PASS) and the seat's ACCEPT (PR comment 6439823894); the seat readied and armed the PR after both (Tier S)

    Landing path: Tier S (scripts/pm/**) — the seat's hand after the contract review PASS and its own ## 席位核对. The card closed as completed through Fixes #26316; pm:dispatched removed in this act. Nothing filed from this review.


    Generated by Claude Code

  10. removed
    pm:dispatched
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:devpathbugci/cddomain:skillspriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions