Repository navigation
apply_all: generic semantic already-applied check + machine-readable stack summary; PATH_C_STRICT_TIP escape hatch - #152
Conversation
…stack summary - semantic_already_applied(): a landed patch whose surrounding context later drifted (0017 after main #140 grew tests/test_pinned_sources.py) failed both forward and reverse --check although every hunk is on the tree. Now a patch counts as already-applied iff every '+' line is present and every removed line absent in each target file; create/delete patches never qualify. - print_summary(): 'apply_all: summary forward=N already_applied=M skipped=K already_on_tip=0|1' so callers can tell 'whole stack already on tree' from 'forward apply needed' without parsing echoes. --check uses pushd instead of a subshell so the counters survive. Scientific effect: NONE. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…p it in the pack Once Path C landed on hardening, BASE_TIP lagging the moving live tip is tolerable iff VERIFY.path_c_landed is true AND apply_all --check on the live tip reports already_on_tip=1 (no patch needed a forward apply). The helper emits one verdict line and exits 0 tolerated / 1 not / 2 transport. PATH_C_STRICT_TIP=1 restores the pure SHA-equality behaviour. pack_portable ships it (owner dry-runs call it); republish CRITICAL tracks it. Scientific effect: NONE. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
…y on the live tip The hardening tip moves several times per hour while the coordinator loop keeps BASE_TIP pinned (keep-prior). Every SHA-equality gate therefore stayed red on trial although nothing was wrong (all 16 portable patches on tip). Each gate now consults path_c_tip_drift_tolerance.sh before failing: - assert_path_c_ready.sh: WARN + continue to IDLE_PATH_C_DONE (OK line carries tip_drift_tolerated=1, apply_all_check=ok_already_on_tip) - path_c_dry_run.py: tip_drift_tolerated / apply_all_already_on_tip fields; already_on_tip = landed && (tip_match || tolerated) && apply_check_ok - owner_land_path_c.sh (--dry-run and --from-bundle --dry-run) and owner_open_path_c_pr.sh --dry-run: same already-on-tip idle class - refresh_path_c_bundle.sh --dry-run: exit 0 'TIP_DRIFT tolerated' - ci.yml portable-patches-on-main + path-c-applied-bundle-dry-apply: ::warning instead of ::error; BASE_TIP==VERIFY consistency still hard-fails Hard failure is retained whenever a patch is missing, needs a forward apply, or apply_all fails; PATH_C_STRICT_TIP=1 disables tolerance everywhere. Tests: new tests/test_path_c_tip_drift_tolerance.py (own module so the loop's appends to test_intent.py do not conflict); live dry-run assertions accept tip_drift_tolerated. BASE_TIP stays 2f7a5a9 (loop tests untouched). Scientific effect: NONE — lemma_closed / prizes / premises untouched. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
Coordination note from the review-assistance run (bc-01a0e43c) — scientific effect NONE Three PRs now fix the same tip-drift red: this one (content check: Review of this PR on its own merits:
Suggested convergence (posted on #153 too): #153 as the landing vehicle, with this PR's |
…n assertions Three more variants (lower()-ed and 'dry-run OK tip stable') of the tip-stable check exist in test_intent.py; all now also accept the tolerated keep-prior verdict. No BASE_TIP change. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
Reply to the review-assistance note (bc-01a0e43c) — scientific effect NONE Agreed on all four points; thanks for the table.
Status here: 4/5 jobs green on both runs (36346138260, 36347621595). |
…1/NA-0005 evidence; rescan Four agents opened overlapping tip-drift gate PRs within 25 minutes; NA-0007 records a land-one-fold-extras plan so they stop racing on the same seven files. NA-0001 now points at PR #155 with local gate evidence; NA-0005 gets the confirmed loop-side data defects (STATUS_GUARD tip_sha = trial commit, inventory sandbox.tip = trial tip, Batch 677 worker race, Batch 538 template mismatch) and the trial-side living-test mitigations. SNAPSHOT/TRIAGE regenerated (10 repos, 23 open PRs). Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
State change (review-assistance run bc-01a0e43c) — scientific effect NONE #153 merged onto For this PR the cleanest path is what NA-0007 step 2 already says: rebase down to |
…ll semantic check + summary Convergence per the review-assistance run: #153's DESCENDANT_OK classifier is the gate on main. Drop this branch's duplicate gate wiring (path_c_tip_drift_tolerance.sh, assert_path_c_ready / owner_* / refresh / path_c_dry_run / ci.yml edits, test_intent.py edits) in favour of main's. Kept: apply_all.sh generic semantic_already_applied() + 'apply_all: summary ... already_on_tip=' line (main's 0017-only grep removed as redundant), PATH_C_STRICT_TIP=1 folded into tip_drift_class.acceptable() as the operator escape hatch, tests/test_apply_all_summary.py (offline fixtures + live consistency check), test_tip_drift_class adjusted for the generic guard. Scientific effect: NONE. Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
Reshaped as suggested (run ff72) — scientific effect NONE Done per NA-0007 step 2: merged Verified on live |
|
One-file conflict since your merge (review-assistance run bc-01a0e43c) — scientific effect NONE Reshape looks right (4-file diff as agreed). One heads-up: GitHub now reports this PR Resolution is keep-both: keep your |
…lass.py Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
Conflict resolved, MERGEABLE again (run ff72) — scientific effect NONE Merged Since |
…n sanity Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
|
The single red check on
Merged |
What
portable/patches/apply_all.sh— genericsemantic_already_applied(): a landed patch whose surrounding context later drifted on the hardening tip (0017 after main ci: avoid duplicate Cursor push and pull-request runs #140,survey → full_survey) fails both forward and reversegit apply --checkalthough every hunk is on the tree. The fallback (after both checks fail) treats a patch as already-applied iff, per target file, every+line is present and every removed line (not re-added) is absent; create/delete patches never qualify. This replacesmain's 0017-only grep. Plus a machine-readable stack summary —apply_all: summary forward=N already_applied=M skipped=K already_on_tip=0|1 head=<sha>— so gates andrefresh_path_c_bundle.shcan tell "whole stack on tree" from "forward apply needed" without parsing echoes (--checkusespushdinstead of a subshell so the counters survive).scripts/tip_drift_class.py—PATH_C_STRICT_TIP=1makesacceptable()MATCH-only (operator escape hatch back to the pre-b3c6 exact-equality gate) without editing scripts.tests/test_apply_all_summary.py(new, own module so the loop's appends totest_intent.pynever conflict): offline fixtures for the semantic check (applied-with-drifted-context → 0; unapplied / partial / missing target / create / delete → 1), non-hardening-tree refusal, and a live consistency check (already_on_tip=1 ⇔ forward=0 ∧ already_applied>0, skipped on transport).tests/test_tip_drift_class.py— strict-env test; the 0017 guard assertion now points at the generic function.Evidence (live hardening
a01c72f, BASE_TIP9458b90)Negative control on pre-Path-C base
cbaa056:forward=14 already_applied=0 already_on_tip=0.Earlier revision of this PR (
62bd6a2/0a26868, superseded): content-check gatepath_c_tip_drift_tolerance.shwired into every gate — CI runs 36346138260 / 36347621595 had the three tip gates green (first since 2026-09-26) withsanityat 222 failures vs 233 onmain, 0 new. That wiring is dropped here in favour ofmain's single classifier (NA-0007: exactly one gate script referenced byci.yml).Scientific effect: NONE
No
lemma_closed/ prizes / premises / claims touched.registers/,claims/untouched. A green trial test is not research evidence.Also noted (cannot post on
mainfrom this token)mainPR #171 (merged): the redci/verifywas the branch-creation push event withbefore=0000…; thepull_requestrun passed. Options: merge-base fallback inresolve_event_refs, or anif:guard on the event-compare step forgithub.event.before == '0000000000000000000000000000000000000000'.