Repository navigation
Check linked closing issues for untrusted edits in Review runs (#2296) - #2300
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Review run and pull-request Custom process execution now guard against untrusted title or body edits on any linked closing issue (including issues linked earlier in the run and later unlinked) across
.thirdshift-review-input.mdpreparation, every Step, session, Repair, Resume, Delivery, and Self-merge, without converting the pull request into a draft.Also updated
GLOSSARY.md,docs/guide.md, regeneratedsite/docs/index.html, and updated hand-writtensite/index.html,site/how-it-works/index.html, andsite/architecture/index.htmlto reflect closing-issue trust checks across Review runs.Evidence
Execution evidence
CARGO_INCREMENTAL=0 cargo test --test review_merge untrusted_closing_issue_edit_during_self_merge -- --nocapture(at120e7be5, before Self-merge guard extraction) exited101: bothuntrusted_closing_issue_edit_during_self_merge_repair_stops_without_merging(tests/review_merge.rs:443:5,left: Some(0)/right: Some(1), stderr ended withthirdshift: merging the PR into mainandthirdshift: step self-merge: 9s succeeded) anduntrusted_closing_issue_edit_during_self_merge_repair_stops_before_push_and_merge(tests/review_merge.rs:497:5,left: Some(0)/right: Some(1), stderr ended withthirdshift: merging the PR into mainandthirdshift: step self-merge: 10s succeeded) failed.HEAD4fabd56f:CARGO_INCREMENTAL=0 cargo test --test base_fix --test ci --test failed_run --test fix_pass --test fix_review_hold --test fix_run --test merge_run --test mergeable --test pr_lifecycle --test process --test review_fix_trust_cutoff --test review_head_lag --test review_merge --test review_pass --test review_run --test review_security --test review_spec_regression --test skip_authors --test spec_review_706_regressions -- --test-threads=2— exited0: 524 passed; 0 failed; 38 ignored across all 19 integration suites (the 2 ignored entries per suite aresupport::child_lifetimeguardian subprocess entrypoints), including:tests/review_merge.rs:14 passed; 0 failed; 2 ignored(untrusted_closing_issue_edit_during_self_merge_repair_stops_without_merging,untrusted_closing_issue_edit_during_self_merge_repair_stops_before_push_and_merge,untrusted_closing_issue_edit_before_self_merge_repair_stops_cleanlyall passed)tests/review_run.rs:46 passed; 0 failed; 2 ignoredtests/process.rs:244 passed; 0 failed; 2 ignoredCARGO_INCREMENTAL=0 cargo test --bin thirdshift -- --test-threads=2— exited0: 1976 passed; 0 failed; 3 ignored; explicitCARGO_INCREMENTAL=0 cargo test --bin thirdshift prompts_pageexited0:14 passed; 0 failed; 0 ignored; 1965 filtered out.CARGO_INCREMENTAL=0 cargo test --test share_card --test site_deploy— exited0:share_card:4 passed; 0 failed; 0 ignored;site_deploy:7 passed; 0 failed; 0 ignored.cargo fmt --check,npm run docs:check --prefix site,python3 scripts/generate-release.py --check,CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings, andpython3 -m unittest discover -s scripts -p 'test_*.py'(Ran 72 tests ... OK) — all exited0.CARGO_INCREMENTAL=0 NEXTEST_TEST_THREADS=2 scripts/affected-tests main:npm test --prefix site— PASS (112.02s,72 passed; 0 failed; 0 skipped).cargo nextest run— passed535/536tests before stopping under default fail-fast on an unrelated host-load5s reqwestHTTP timeout intests/console.rs:195(plan_usage::harness_summary_keeps_identities_restrictions_and_freshest_unidentified_state_in_scope, while shared VM load spiked externally to5.64/141.1%per CPU;4305/4841tests unrun). Re-runningCARGO_INCREMENTAL=0 cargo test --test console plan_usage:: -- --nocapturepassed all9tests (9 passed; 0 failed; 0 ignoredin11.24s).main(d6213579):npm test --prefix site— exited0: 74 passed; 0 failed; 0 skipped (112263.22ms).CARGO_INCREMENTAL=0 cargo build --locked && npm test --prefix console— exited0: 265 passed; 0 failed; 0 skipped (436881.10ms).CARGO_INCREMENTAL=0 cargo test --test share_card --test site_deploy— exited0:share_card:4 passed; 0 failed; 0 ignored;site_deploy:7 passed; 0 failed; 0 ignored.CARGO_INCREMENTAL=0 cargo test --bin thirdshift prompts_page— exited0:16 passed; 0 failed; 0 ignored; 1973 filtered out.npm run docs:check --prefix site,python3 scripts/generate-release.py --check,cargo fmt --check,CARGO_INCREMENTAL=0 cargo clippy --all-targets -- -D warnings, andpython3 -m unittest discover -s scripts -p 'test_*.py'(Ran 72 tests in 35.100s ... OK) — all exited0.CARGO_INCREMENTAL=0 cargo nextest run --test-threads=2 --no-fail-fast—4866 passed (31 slow), 3 failed, 219 skipped(7518.617s); all tests touched by#2296passed, and the 3 failures were contention-induced timing bounds in unrelated tests (otlp_endpointa_stalled_receiver_cannot_delay_a_session_by_its_span_count:baseline 2.321031892s; stalled 4.364525062sduring concurrentsite-testChromium execution;releaseexperiments::repaired_content_waits_for_its_own_experiment_before_tagging[413.585s] &experiments::unpublished_tag_recovery_keeps_the_prior_experiment_baseline[416.907s] hitting the300sEXPERIMENT_BOUNDwhile running in parallel). Re-running uncontended passed cleanly:CARGO_INCREMENTAL=0 cargo test --test otlp_endpoint -- --nocapture— exited0:4 passed; 0 failed; 2 ignored(11.12s).CARGO_INCREMENTAL=0 cargo test --test release experiments:: -- --test-threads=1— exited0:7 passed; 0 failed; 146 filtered out(850.67s).Visual evidence
Before — Docs Review runs closing-issue trust checks, desktop 1440×900
After — Docs Review runs closing-issue trust checks, desktop 1440×900
Merge Danger
Door: two-way
Tightens pull-request closing-issue trust validation inside Review runs and Self-merge without altering persistence schemas or external state formats; reversible by reverting these commits.
Blast Radius: targeted
Scoped to Review run / custom pull-request Process execution (
src/processes/review*), sharedClosingIssuesPR guard (src/delivery.rs), integration tests (tests/review_run.rs,tests/review_merge.rs), and Review run documentation (GLOSSARY.md,docs/guide.md,site/).Unaddressed findings
None. All actionable findings reported in the local review (
3Standards findings:StepKind::SelfMergebypass, Data Clump / shallowMiddle Man/ duplicated guard checks acrossreview.rs&delivery.rs, and duplicated test setup intests/review_run.rs; plus1Spec finding:StepKind::SelfMergeclosing-issue enforcement gap) were reproduced and resolved in4fabd56f.11of12) were read by both review axes. Generated filesite/docs/index.htmlwas intentionally excluded from direct review reading under Generated-Output Exclusion (thirdshift-code-review) and verified through its sources (docs/guide.md,site/generate-docs.mjs),npm run docs:check --prefix site, rendered diff inspection, and the72-testsitebrowser suite.Security
No unaddressed introduced findings.
CI notes
All 7 failed checks on
d6213579hit a transient Ubuntu Nobleaptmirror failure during runner provisioning (or downstreamneedsgates waiting on those setup failures); this branch changes zero workflow,scripts/,console/, oraptfiles, both merge parents passed full CI (4fabd56fin runs44517439931/44517439847;58b411cbin44512945394), and the affected suites were verified locally ond6213579(see### Execution evidenceabove):site-test(job135548119079): failed innpx playwright install --with-deps chromium(apt-getexited100->1withCould not wait for server fd - select (11: Resource temporarily unavailable)/Connection failedonsecurity.ubuntu.com/apt-mirrors.txt) before runningnpm test; unrelated to this branch (npm test --prefix sitepasses locally ond6213579with74 passed; 0 failed, and4fabd56fpassed in44517439931).console-test(job135548119520):Run cargo build --lockedandRun npm cipassed, thennpx playwright install --with-deps chromiumfailed (exit code 100->1) with the samesecurity.ubuntu.comapttimeout; unrelated to this branch (console/and workflows untouched,npm test --prefix consolepasses locally ond6213579with265 passed; 0 failed, and4fabd56fpassed in44517439931).rust-x86 / run (3)(job135548119947): failed inInstall sandbox dependencies(sudo apt-get install --yes apparmor bubblewrap socat,exit code 100withCould not connect to azure.archive.ubuntu.com:80, connection timed out/Unable to connect to azure.archive.ubuntu.com:http:) before compiling or running tests; unrelated to this branch (.github/workflows/rust-tests.ymluntouched, sibling partitionsrun (1)[1195 passed] /run (2)[1242 passed] succeeded on PR merge commit3b27cad5, and all 4,869 tests ran locally ond6213579).rust-x86 / run (4)(job135548119774): failed inInstall sandbox dependencies(sudo apt-get install --yes apparmor bubblewrap socat,exit code 100withConnection failedonhttp://security.ubuntu.com/ubuntu) before compiling or running tests; unrelated to this branch (.github/workflows/rust-tests.ymluntouched, sibling partitionsrun (1)/run (2)succeeded on PR merge commit3b27cad5, and all 4,869 tests ran locally ond6213579).rust-x86 / complete(job135554107401): downstream gate failed (test "$RESULT" = successwithRESULT: failure,exit code 1) solely becauserust-x86 / run (3)andrun (4)failedapt-getsetup; unrelated to branch changes.test(job135554209223): downstream gate failed (test "$RESULT" = successwithRESULT: failure,exit code 1) solely becauserust-x86 / completefailed; unrelated to branch changes.build-local-artifacts (x86_64-unknown-linux-musl)(job135548435065): failed inInstall dependencies(sudo apt-get install musl-tools,exit code 100with503 Service UnavailableandConnection failedonsecurity.ubuntu.com/apt-mirrors.txt) beforedist build; unrelated to this branch (dist-workspace.tomland.github/workflows/release.ymluntouched, siblingbuild-local-artifacts (aarch64-unknown-linux-musl)[135548435144],release-tag-guard, andplanpassed in44520668064, and4fabd56fpassedReleasein44517439847).Closes #2296
Built with agy 1.5.9 · gemini-4-hydrogen-xhigh · default effort
Security review outcome
No unaddressed introduced findings.