Skip to content

ci: printed-command paste callable leaf (slice 2 of #8082) - #11906

Merged
EffortlessSteven merged 3 commits into
mainfrom
claude/project-thread-j1fibr-8082-s2
Nov 1, 2026
Merged

EffortlessSteven merged 3 commits into
mainfrom
claude/project-thread-j1fibr-8082-s2

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Summary

Slice 2 of the split of oversized #8082: the printed-command paste qualification leaf. Carved from codex/4987-caller-paste-integration (4b2f669), which is unmodified. Slice 1 (Windows subset leaf) landed as #11773.

Swarm / Source Boundary

  • swarm-only CI, runner, routing, source-of-truth, or agent-operating surface

Source-of-truth Links

Governing issue or accepted claim: #4987
Acceptance delta (one sentence): printed-command-paste.yml gains an inert workflow_call route whose exact-source Bash guard (subject, tree, parents, workflow generation) runs before the unchanged product payload, with a 20-minute job limit and the schedule/manual/PR triggers kept until the admitted caller lands.

Candidate Relationships

Candidate branch: claude/project-thread-j1fibr-8082-s2
Stack parent or prerequisite PR (if any): none (main includes #11773)
Proposed replacement of PR (if any; not yet accepted): carves part of #8082; #8082 is not superseded until slices 3-5 land.

Scope

  • .github/workflows/printed-command-paste.yml: callable inputs, concurrency keyed by request/subject, exact-source guard step, 45 to 20 minute timeout.
  • tools/repo-policy/tests/printed_command_admission.rs (8 tests) with fixtures/convergence/printed-command-paste/original.yml as the retained predecessor.
  • tools/repo-policy/tests/rust_only_routing.rs: group anchor for the callable leaf (2 lines).
  • policy/process_allowlist.txt (2 entries) and policy/workflow_allowlist.txt (run-block cap 1 to 22).
  • docs/handoffs/2026-10-15-printed-command-admitted-leaf.md, changelog fragment changelog.d/4987-printed-command-admitted-leaf.md.

No .claude/ or .agents/ changes.

Scope Classification

  • One architectural seam

Proof

Run locally with CARGO_BUILD_JOBS=2: cargo test -p repo-policy --test printed_command_admission (8/8), --test rust_only_routing (16/16), --test workflow_action_pins (7/7), all repo-policy integration targets (112 passed, 0 failed), cargo xtask check-workflows, check-file-policy, check-process-policy, check-doc-index, check-doc-artifacts, and cargo fmt --check. Not run locally: cargo xtask precommit, and the repo-policy lib tests (3 llvm-profdata tests fail here for environmental reasons). Hosted CI is the arbiter for the rest.

An independent exact-head review of 9326ac3 found no blockers: carved files match the #8082 head, permissions stay contents: read, no secrets, the Bash guard passes every expression through env:, and the existing triggers and matrix are unchanged. It found one overclaim: the handoff's final section described final_readiness_diagnostics.rs and a caller run that belong to a later slice. That section is removed in fcc5297.

Left for slices 3-5: CI exact-subject leaf (ci.yml, rust-gates.yml), Python wheel leaf, the routed-rust caller/admission and native_admission suites, and guidance (docs/CI.md, docs/ci).

Claim Boundary

Prepares the callable leaf only. The legacy schedule, manual and PR triggers are retained, so no caller depends on this yet. It does not establish native admission, final readiness or any Windows result.

Policy Impact

  • CI lane / process allowlist: two process_allowlist.txt rows for the new test, and the printed-command-paste.yml run-block cap raised from 1 to 22 to hold the exact-source guard.

CI Economics

The job timeout drops from 45 to 20 minutes on all routes, including the scheduled and legacy PR runs. A cold-cache build that exceeds 20 minutes would time out; the handoff records this.

Rollback

Revert the squash commit; the legacy triggers are unchanged, so nothing depends on the new route.


🤖 Generated with Claude Code

https://claude.ai/code/session_01YVdGzRSyK6eGgevTacSvoQ

Carve the exact-subject printed-command paste leaf out of oversized #8082:
workflow_call inputs, bounded exact-source guard before the unchanged
product payload, 20-minute job limit, retained schedule/manual/PR triggers,
the admission contract test with its predecessor fixture, handoff, policy
allowlist entries and the rust_only_routing group anchor. Inert until the
admitted caller lands (#4987).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzRSyK6eGgevTacSvoQ
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 149 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: bbc541f2-e30c-4d55-828d-c2eeb3d9be06
Commits

Reviewing files that changed from the base of the PR and between a5c3ba4 and 0fc5d13.

Files selected for processing: 8
  • .github/workflows/printed-command-paste.yml
  • changelog.d/4987-printed-command-admitted-leaf.md
  • docs/handoffs/2026-10-15-printed-command-admitted-leaf.md
  • fixtures/convergence/printed-command-paste/original.yml
  • policy/process_allowlist.txt
  • policy/workflow_allowlist.txt
  • tools/repo-policy/tests/printed_command_admission.rs
  • tools/repo-policy/tests/rust_only_routing.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

…o a later slice

The printed-command leaf handoff carried the caller diagnostic follow-up from
the #8082 head, which describes final_readiness_diagnostics.rs and a caller run
this slice does not contain.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVdGzRSyK6eGgevTacSvoQ
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 31, 2026 21:49
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Copy Markdown
Member Author

Independent exact-head review of 9326ac3: SAFE_TO_MERGE for the workflow, test and policy content (carved files match the #8082 head; permissions, triggers and matrix unchanged; guard expressions go through env:). One doc overclaim (handoff section describing later-slice final_readiness_diagnostics.rs) is trimmed in fcc5297, and the PR body now has the Claim Boundary, Policy Impact, CI Economics and Rollback sections. Marked ready and requested merge-ready on the new head; I'll merge once the required result is green on fcc5297.


Generated by Claude Code

@EffortlessSteven EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Independent review (fresh-context reviewer, head fcc5297): REVIEW_INCOMPLETE

Inspected:

  • Head fcc5297e580d7edd313b006a0f3f73c2372896ce; base main tip fa621a32eaf4c3dc6c17119021ea943641696aef. Merge base resolved by walking first-parent chains against main history: 113c9cd695dc6678e726d9687d6932c2f1281971 (10 main commits behind), so I diffed against that, not against baseRefOid.
  • .github/workflows/printed-command-paste.yml:1-36 (new workflow_call trigger and 7 required string inputs), :38-52 (concurrency group and cancel-in-progress), :76-138 (the Verify exact source before product execution guard), and :139-161 (the unchanged toolchain/cache/payload steps).
  • tools/repo-policy/tests/printed_command_admission.rs — input_bindings() (:18-37), contract() (:82-100), the two mutant suites (:39-80, :133-160) and the Linux execution module (:162-411) that replays the literal guard body with stubbed git/cargo functions under timeout 10s.
  • tools/repo-policy/tests/rust_only_routing.rs:553-601 — the gated-lane concurrency/admission contract, now extended to printed-command-paste.yml.
  • policy/workflow_allowlist.txt (budget 1 → 22) and policy/process_allowlist.txt (two new rows for the new test file).
  • fixtures/convergence/printed-command-paste/original.yml and fixtures/convergence/README.md, compared against the merge-base workflow and against the established fixtures/convergence/ci-exact-subject/original.yml pattern.
  • docs/handoffs/2026-10-15-printed-command-admitted-leaf.md, changelog.d/4987-printed-command-admitted-leaf.md.
  • .github/workflows/ci.yml:83-86, :131-159, :201-207 and .github/workflows/rust-gates.yml:229-246, :349-388 — the pre-existing repo idiom and the lane that would execute this PR's test.
  • Cargo.toml:1-4 — tools/repo-policy is a workspace member.

Blocking:

  • None found.

Non-blocking:

  • The callable route is dormant in this slice, which is the right boundary. I searched every file under .github/workflows on main: nothing references printed-command-paste except the workflow itself, and this PR adds no caller. The workflow_call trust boundary therefore does not exist yet, and the handoff's staging note ("keep the PR trigger until the parent integrates an admitted caller and fail-closed result aggregation") matches what is in the tree.
  • GITHUB_WORKFLOW_SHA is the one guard predicate that source cannot settle. [[ "$GITHUB_WORKFLOW_SHA" == "$GENERATION" ]] (printed-command-paste.yml:128) depends on GitHub resolving that env var to the caller's workflow-file SHA for a called reusable workflow. The test proves the predicate's logic with a stubbed value (printed_command_admission.rs:211), not the platform semantics. The handoff says so explicitly; a hosted called-run control must establish it before the parent removes the PR trigger.
  • The contains(toJSON(inputs), '"subject_sha"') discriminator is correct, and I confirmed it is the repo's established idiom rather than a new invention — ci.yml:131, :141 and :201 already use the same expression, and the ci.yml reusable leaf (routed-rust.yml → rust-gates.yml) is the existing caller/leaf pattern this slice follows.
  • The 20-minute job limit replaces 45 minutes. On this exact head the paste lane measured 3.8 min (ubuntu), 7.7 min (macos) and 6.6 min (windows), so there is roughly 2.6x headroom on the observed run — but that run had a warm Cargo cache, and the handoff's "Cold builds can time out" caveat is not measured away.
  • The policy/workflow_allowlist.txt budget of 22 is exactly right: the guard's run: block spans workflow lines 117-138, i.e. 22 non-empty lines, against max_non_empty_lines semantics from tools/repo-policy/src/lib.rs:404-446 and :542-551. The other three run: lines are one line each. The budget is at the limit with no slack, so one added guard line will fail the gate.
  • The two policy/process_allowlist.txt rows match the new file exactly: one use std::process::Command and one Command::new (printed_command_admission.rs:165, :190), both inside the printed-command-admission-proof owner.
  • The convergence fixture is not a snapshot of the immediate pre-change workflow: fixtures/convergence/printed-command-paste/original.yml predates the labeled trigger, the merge-ready concurrency group and the job-level if: that already exist on main. Its payload() helper only compensates for the rust-toolchain/rust-cache pinning spelling, so the fixture cannot detect a regression in the admission expression; that coverage comes instead from input_bindings() (exact-string) and the behavioural admitted() tests. Not a defect — the fixture follows the ci-exact-subject convention — but a reader could mistake it for a "before this PR" snapshot, so one line in the fixture or README would remove the ambiguity.
  • The oracle is genuinely discriminating, not merely positive: removing the parent predicate is shown to admit a wrong integration commit (printed_command_admission.rs:389-396), removing the callable bypass is shown to reject a valid called request (:317-336), and 15 malformed/wrong/injected identity cases are refused (:366-388). The timeout 10s guard asserts the deadline was not hit (:220), so a hang cannot read as success.

Not run:

  • No local build or test: cargo, rustc and rustup are absent from PATH on this host and the working tree is shared with concurrent agents.
  • The hosted Rust gates lane ("Ripr Rust Small on GitHub Hosted / Rust gates") was still IN_PROGRESS on this head, so the proof that would actually execute this PR's new test is unobserved: cargo nextest run --workspace (rust-gates.yml:357) is what runs tools/repo-policy/tests/printed_command_admission.rs, and cargo clippy --workspace --all-targets -- -D warnings (:246) and cargo xtask check-process-policy (:231) are the gates that would cover the new file and the two policy rows.
  • Observed green on this head: paste-ubuntu-latest, paste-macos-latest, paste-windows-latest (suite 41245405188), Rust-only feature lane (41245405083, 18.3 min), cargo-deny, dependency-review, Routed Rust Small admission, GitGuardian Security Checks. Unobserved (SKIPPED on the head suite, i.e. missing proof rather than green): msrv, ci-result, source-identity, vscode, rust-tests-junit, rust-coverage, future-clippy, windows-advisory, macos-advisory. CodeRabbit is NEUTRAL and Devin Review is SUCCESS (external, not authoritatively binding).
  • I did not verify any macOS/Windows hosted behaviour of the new guard, and no GitHub expression-engine execution of the job if: was observed — the admitted() translation is textual.

Reviewed by an independent Mavis review agent on behalf of the maintainer; bound to head fcc5297e580d7edd313b006a0f3f73c2372896ce. Not an approval.

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

Confirmed findings

  • Route detection relies on whether the serialized inputs object contains the literal key subject_sha, not whether the input is present and valid.

Verification questions

  • Confirm no broad repository-wide caller/sibling scan is present in this diff; the Rust routing test only adds the named workflow leaf anchor.
  • Confirm the GitHub-expression admission oracle rewrites workflow expressions instead of evaluating them, so it cannot detect semantic errors in the actual expressions.
  • Confirm the guard validates the exact checked-out commit, tree, ordered integration parents, and workflow generation, but the test stubs Git rather than exercising real repository object relationships.
  • Confirm hosted behavior of input detection and inherited caller events is not established by the available source-level evidence.
  • Confirm the callable job admission bypass can run the product matrix on a called event before the exact-source guard has independently established that the caller supplied the required identity fields.
  • Confirm the callable-route oracle executes the literal Bash guard and payload, but does not execute GitHub Actions expression evaluation for job admission or concurrency.

Evidence gaps

  • Secret exposure or write authority is not introduced by this leaf; hosted execution and workflow-hardening evidence remain incomplete.
  • Model proof intent was rejected by deterministic validation.
  • Call detection depends on contains(toJSON(inputs), '"subject_sha"'), while required workflow_call inputs should make that condition true; no actual GitHub expression-engine control proves it.

Parked follow-ups

  • The route checks an admitted subject rather than authorizing admission itself; the handoff assigns authorization, freshness, and missing-result refusal to the parent caller.
  • Hosted execution was not established by the source tests; macOS/Windows behavior and GitHub expression evaluation remain outside the local lifetime-focused proof.

Copy link
Copy Markdown
Member Author

Required shard 1 of 4 failed on analysis::language::python::guard_activation::tests::compare_literal_values_fails_open_on_undecoded_literals (guard_activation.rs:1436, None != 0 returns None, expected Some(true)). This PR touches only workflow, policy and test files, and the test is red on main after #11842. The fix is #11918 ("None never equals a number in shared literal equality (main red)"). Once it merges I will merge main into this branch and re-request the required result.


Generated by Claude Code

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

Confirmed findings

  • The callable admission bypass runs on inherited caller events before the Bash guard establishes the call context and exact source identity.

Verification questions

  • Confirm callable admission detects inputs by serializing the inputs object and looking for the subject_sha key; this is a source-level heuristic rather than an executed GitHub-expression proof.
  • Confirm the callable-route oracle only recognizes the literal presence of the subject_sha key and does not evaluate GitHub's expression semantics or required-input validity.
  • Confirm route detection uses serialized-input key presence rather than the validity of supplied identity fields, so a called request containing subject_sha can bypass the legacy PR admission condition before the guard validates it.
  • Confirm call-route detection uses a substring search over serialized inputs, so it proves key presence rather than that the workflow was invoked through workflow_call.
  • Confirm the callable route is gated by presence of the serialized subject_sha key, while required-value validity is established later by the exact-source Bash guard.
  • Confirm source tests replay the Bash guard and locally rewrite selected GitHub expressions; they do not establish GitHub-hosted input detection, inherited event semantics, or reusable-workflow result behavior.
  • Confirm the source-level test proves the literal Bash guard and payload, but cannot establish GitHub expression evaluation or hosted called-workflow inheritance behavior.
  • Confirm the callable bypass mutant test removes the expression to test rejection but never executes the actual workflow job condition or a workflow_call event.

Evidence gaps

  • The Rust tests prove the changed behavior are source-level oracles, not hosted GitHub Actions semantics: expression evaluation, inherited call events, and real checkout ancestry remain unexecuted.
  • Model proof intent was rejected by deterministic validation.
  • The exact-source guard depends on hosted Git behavior and GitHub expression evaluation that the synthetic test stubs or rewrites.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants