Skip to content
This repository was archived by the owner on Oct 14, 2026. It is now read-only.

[superseded by #153 landing] CI: landed-ancestor Path C tip gate (stop requiring live == BASE_TIP) - #154

Closed
d6g8k5htny-coder wants to merge 7 commits into
mainfrom
cursor/ci-landed-ancestor-tip-gate-b8d6
Closed

d6g8k5htny-coder wants to merge 7 commits into
mainfrom
cursor/ci-landed-ancestor-tip-gate-b8d6

Conversation

@d6g8k5htny-coder

@d6g8k5htny-coder d6g8k5htny-coder commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Scientific effect: NONE. No claim, premise, prize or lemma changes; lemma_closed stays false. Engineering truthfulness fix only.

Status (20:50Z): superseded. #153 merged onto main at 20:43Z (main @ bb24d803) with scripts/tip_drift_class.py (MATCH/DESCENDANT_OK) wired into both ci.yml gate steps and BASE_TIP = 9458b90; the first post-merge main run 36349065906 has all four gate jobs green. This PR will not be landed. It stays open only as a reference for pieces that may still be worth porting into tip_drift_class.py: the 0019-merge ancestor requirement (landed_merge_is_ancestor_of_live), the blobless cache-clone ancestry fallback, the git ls-remote fallback in write_path_c_status.py, and the 16 offline gate tests in tests/test_path_c_tip_gate.py. Remaining convergence work is tracked on #155 (needs_attention inbox, now CONFLICTING and being reshaped) and #152 (apply_all.sh generic semantic check, df6b700f).

Why

Trial CI has been red on main since 2026-09-26 13:16 (first failing run 36244598239) because every tip gate requires the live chatgpt/drive-github-hardening-20260919 SHA to be byte-equal to portable/patches/BASE_TIP.txt (2f7a5a9). Two facts make that impossible now:

  • Path C is landed: VERIFY.json path_c_landed=true, 0019 merge 542e6ec is in hardening history.
  • The wake loop keeps BASE_TIP immutable ("TIP_DRIFT keep-prior (BASE immutable)") while the hardening branch is actively developed (live tip moved e7652a1 → d4ad3bb → 9458b90 → 9ce5c66 → ee1e9c9 → a01c72f during this session; 166 commits ahead of BASE at 20:40Z).

So the gate is permanently red without saying anything about Path C, and ~85 Intent tests plus the portable-patches-on-main, path-c-applied-bundle-dry-apply and land-workflows-dry-run jobs fail on every push, including on unrelated PRs (#149, #150).

What

New scripts/path_c_tip_gate.py decides one of:

state meaning tip_ok
TIP_MATCH live == BASE_TIP yes
LANDED_ANCESTOR path_c_landed and BASE_TIP and the recorded 0019 merge are both ancestors of live yes
TIP_DRIFT BASE not in live history (rewritten/diverged), or Path C not landed no (exit 1)
UNKNOWN ancestry not establishable no (exit 2)

Ancestry order: git merge-base --is-ancestor on the given clone (progressive --deepen on shallow CI clones) → reusable 1 MB blobless clone ($TMPDIR/path-c-tip-gate-cache, 0.3 s warm) → GitHub compare API last. Anonymous URLs are tried before tokenized ones (public repo; stale pod token otherwise 401s everything). tip_matches_base stays literal equality everywhere; tip_ok / tip_state carry the decision.

Wired into: ci.yml (both tip gates; step keeps its Tip-drift gate name for the Batch 147 contract), refresh_path_c_bundle.sh --dry-run, assert_path_c_ready.sh, owner_land_path_c.sh (dry-run + from-bundle dry-run), owner_open_path_c_pr.sh, path_c_dry_run.py (skips the meaningless historical apply_all --check on a landed ancestor — 0017 no longer forward/reverse-applies on the moved tree — mirroring the Batch 246 CI idle skip), when_writable_land.py, write_path_c_status.py (+ git ls-remote fallback when anonymous REST is rate-limited), alignment_status.py.

Tests: tests/test_path_c_tip_gate.py (16 offline tests, ancestry stubbed, own module so wake-loop appends never conflict); in test_intent.py, _assert_tip_ok(data) replaces 21 tip_matches_base is True asserts, _living_tip() consults the gate for SHAs outside the static allowlist (ends per-batch allowlist churn), refresh dry-run asserts accept the landed-ancestor OK line.

Verification

GitHub Actions on this branch, latest run 36347560786 @ 0bd79e1b:

portable-patches-on-main         success   tip gate OK: LANDED_ANCESTOR live=9458b90 BASE_TIP=2f7a5a9 via=git
path-c-applied-bundle-dry-apply  success   tip gate OK: LANDED_ANCESTOR ... BASE_TIP==VERIFY=2f7a5a9; lemma_closed=false
land-workflows-dry-run           success
research-stack-status-guard      success
sanity                           failure   149 failed — strict subset of main's 233 (84 fixed, 0 new)

The 149 remaining sanity failures are the wake loop's own pin debt (STATUS (Batch NNN research-audit) headers overwritten by later batches, tip_sync_watch_keep_prior_parent_pin LIVE-sha allow-lists, test_batch538 missing BATCH538_TIP_SYNC_IDLE.json, test_batch323 inventory drift); none of the tip-gate PRs can turn sanity green while the loop keeps pinning live SHAs.

Local, live tip: refresh --dry-run exit 0; assert_path_c_ready.sh → IDLE_PATH_C_DONE; owner_land_path_c.sh --dry-run / --from-bundle --dry-run / owner_open_path_c_pr.sh --dry-run → already-on-tip idle, exit 0; negative control --live 2cce7bf… (default main) → TIP_DRIFT, exit 1; gate on a01c72f (live at 20:40Z) → LANDED_ANCESTOR via cache clone.

Not touched: LAND.md, OWNER_ACTIONS_MAIN.md, AUTONOMOUS_48H_LOG.md, BATCH*.json, BASE_TIP.txt (wake-loop-owned; avoids merge conflicts).

Open in Web Open in Cursor 

cursoragent and others added 2 commits September 27, 2026 19:50
…==BASE_TIP

Path C is landed (VERIFY.path_c_landed=true; 0019 merge 542e6ec in hardening
history) and the wake loop keeps BASE_TIP immutable while the hardening branch
moves, so the byte-equality tip-drift gate has been red since 2026-09-26
without saying anything about Path C.

Add scripts/path_c_tip_gate.py (TIP_MATCH | LANDED_ANCESTOR | TIP_DRIFT |
UNKNOWN; git merge-base with progressive deepen on shallow clones, GitHub
compare API fallback, blobless temp clone last) and wire it into the CI
tip gates, refresh_path_c_bundle.sh --dry-run, assert_path_c_ready.sh,
owner_land_path_c.sh, owner_open_path_c_pr.sh, path_c_dry_run.py,
when_writable_land.py, write_path_c_status.py and alignment_status.py.

tip_matches_base stays literal equality; tip_ok / tip_state carry the gate
decision. Real drift (BASE_TIP or the 0019 merge not in live history) still
fails with the refresh fix path. Scientific effect: NONE.

Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
… history clone

- tests: _assert_tip_ok(data) replaces 21 literal tip_matches_base is True
  asserts on path_c_dry_run output; _living_tip() consults the tip gate for
  hardening SHAs not in the static allowlist (no more per-batch allowlist
  churn); refresh --dry-run asserts accept the landed-ancestor OK line;
  from-bundle asserts accept tip_ok=true.
- path_c_tip_gate: prefer a reusable blobless shallow clone
  (PATH_C_TIP_GATE_CACHE, default $TMPDIR/path-c-tip-gate-cache) for
  ancestry before the compare API, so anonymous 60/h REST quota on shared
  runners is not burned by repeated gate calls.
- owner_open_path_c_pr / owner_land_path_c: call the gate from $ROOT/scripts
  (TRIAL_ROOT may be a bare portable tree without scripts/).
- write_path_c_status: git ls-remote fallback when the anonymous REST tip
  fetch is rate-limited, so PATH_C_STATUS.tip is never nulled by quota.

Scientific effect: NONE.

Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
cursoragent and others added 2 commits September 27, 2026 20:15
… API retry, offline tests

The GITHUB_TOKEN injected in these pods can be stale (gh auth status →
'token in GITHUB_TOKEN is invalid'); a tokenized clone/ls-remote/compare
then 401s although the research repo is public. Try the anonymous URL
first and fall back to the token; retry the compare API anonymously on 401.

tests/test_path_c_tip_gate.py: 16 offline tests (ancestry stubbed) covering
TIP_MATCH / LANDED_ANCESTOR / TIP_DRIFT (base missing, merge missing, not
landed) / UNKNOWN, CLI --sh/--json and exit codes 0/1/2. Own module so
wake-loop appends to tests/test_intent.py never conflict.

Scientific effect: NONE.

Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
@cursor cursor Bot changed the title CI: landed-ancestor Path C tip gate (stop requiring live == BASE_TIP) [superseded by #153 landing] CI: landed-ancestor Path C tip gate (stop requiring live == BASE_TIP) Sep 27, 2026
…landed tip_drift_class gate)

#153 landed scripts/tip_drift_class.py (DESCENDANT_OK) as trial main's single
tip gate. Resolve every conflict toward origin/main:

- ci.yml, assert_path_c_ready.sh, owner_land_path_c.sh, owner_open_path_c_pr.sh,
  path_c_dry_run.py, refresh_path_c_bundle.sh: main's version wholesale (this
  branch's edits there were only the parallel path_c_tip_gate wiring; keeping
  the auto-merged remainder would leave TIP_LANDED_ANCESTOR unset).
- write_path_c_status.py: main's tip_match/tip_exact_match/tip_drift_class
  fields; keep this branch's git ls-remote live-tip fallback.
- tests/test_intent.py: main's _descends_from_base_tip/_living_tip and its
  descendant_ok dry-run strings; _assert_tip_ok helper kept (compatible).

Not resolved here (auto-merged, reported separately): when_writable_land.py
and alignment_status.py still stack path_c_tip_gate after tip_drift_class.
Scientific effect: NONE.

Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
@cursor

cursor Bot commented Sep 27, 2026

Copy link
Copy Markdown
Contributor

Merged origin/main (Batch 836, ec680911) — conflict classification — scientific effect NONE

Merge commit 6f5e1d80; GitHub reports MERGEABLE again. 19 hunks in 8 files, all one root cause: this branch's path_c_tip_gate.py wiring and main's landed tip_drift_class.py wiring (#153) occupy the same lines.

Simple (resolved toward main, per the one-gate rule in NA-0007):

  • ci.yml, assert_path_c_ready.sh, owner_land_path_c.sh, owner_open_path_c_pr.sh, path_c_dry_run.py, refresh_path_c_bundle.sh — main's version wholesale. Every edit this branch had in those files was the parallel gate; keeping the auto-merged remainder would have left TIP_LANDED_ANCESTOR referenced but never set in the owner scripts.
  • write_path_c_status.py — main's tip_match / tip_exact_match / tip_drift_class fields; kept this branch's git ls-remote live-tip fallback (independent, non-conflicting).
  • tests/test_intent.py — main's _descends_from_base_tip / _living_tip and its descendant_ok dry-run strings (8 hunks); _assert_tip_ok helper kept, it accepts tip_matches_base is True so it is compatible with main's semantics.

Residual diff vs main is now 6 files: path_c_tip_gate.py + tests/test_path_c_tip_gate.py (unreferenced by CI), the ls-remote fallback, and the two items below.

Complicated (auto-merged cleanly, intentionally left for a decision):

  1. scripts/when_writable_land.py — git stacked the two classifiers: main's block sets matches=True on DESCENDANT, then this branch's block runs when matches is False and can set tip_ok=True if path_c_tip_gate says LANDED_ANCESTOR — i.e. when tip_drift_class returns UNKNOWN (network) the second gate can override its fail-closed answer. Same on scripts/alignment_status.py (additive tip_ok/tip_state, no override). Fix if wanted: delete this branch's block and set tip_ok = matches (one gate), or fold the blobless-cache ancestry fallback into tip_drift_class.py instead.
  2. tip_matches_base semantics — main's landed code makes it the gate decision (True on DESCENDANT + landed; literal lives in tip_exact_match, and the owner scripts print tip_matches_base=true (DESCENDANT_OK)), whereas apply_all: generic semantic already-applied check + machine-readable stack summary; PATH_C_STRICT_TIP escape hatch #152/[superseded by #153 landing] CI: landed-ancestor Path C tip gate (stop requiring live == BASE_TIP) #154/needs_attention: cross-repo agent handoff inbox + scan/check tooling #155 all agreed to keep it literal. Not a merge-conflict problem — the merge follows main — but a semantic divergence that landed via Land PR #150; unfreeze Path C tip-sync (0017 semantic guard) and make tip-drift gates DESCENDANT_OK #153 without CI; worth a follow-up on main if the literal contract matters to downstream readers of PATH_C_STATUS.json.

Targeted checks after resolution: py_compile on all scripts OK; tests/test_path_c_tip_gate.py 15 passed; test_intent batch147 (ci.yml gate-name contract), batch153, readme_states_sandbox_boundary pass.

cursoragent and others added 2 commits September 27, 2026 21:57
Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>
Co-authored-by: Dylan Roy <d6g8k5htny@privaterelay.appleid.com>

Copy link
Copy Markdown
Owner Author

Release-queue disposition — OpenAI/ChatGPT, acting under Dylan's explicit PR-management delegation. I re-read this PR at f8781a018f1e8252fca52658c0e02ab7a36cc387 and verified #153 is merged. This PR explicitly says it will not land and is superseded. I am closing it unmerged, preserving the branch, commits, discussion and all source bytes. Potentially reusable pieces remain discoverable here: 0019-merge ancestry requirement, blobless ancestry fallback, ls-remote fallback and the sixteen offline tests. Any future port should be a small new source-bound PR against current main, not a resurrection/merge of this obsolete competing implementation. Closure is queue hygiene, not theorem acceptance or a claim that every unique line was adopted.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants