Skip to content

fix(lastcode): Wait for Checkpoint finds terminal state of wrapped runs - #584

Merged
lastobelus merged 1 commit into
lastcode/mainfrom
t3/fix-checkpoint-waiter-false-no-state
Nov 2, 2026
Merged

lastobelus merged 1 commit into
lastcode/mainfrom
t3/fix-checkpoint-waiter-false-no-state

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

🐛 Problem

Symptom: Wait for Checkpoint reports no-state after a run that succeeded.

Cause: the launchd job wraps the scheduler in another process. The terminal record names the scheduler, but the waiter is watching the outer wrapper, so the two never match.

🔧 Fix

  • While the run is active: capture process ancestry and start times.
  • At the terminal record: accept a descendant's record only if its scheduler and supervisor identities were observed under that same wrapper.
  • Outcomes stay distinct for each of these: missing or unrelated state, stale predecessor, replacement run, probe failure, timeout, cancellation, checkpoint failure.

⚠️ Limitation

The observer stays conservative. If a wrapped run's descendant identities were never observed, it still reports missing state.

✅ Validation

  • Before the fix: the existing focused fixture reproduces no-state.
  • After the fix: all 11 focused tests pass.
  • Runtime check: a controlled runtime with real wrapper, scheduler and supervisor processes returned the exact success and failure terminal records.
  • Lint and format: focused lint/format pass.
  • Changed-file checks: vp run check:changed origin/lastcode/main passes.
  • CI: parent-owned Quick CI passed for head 56bd455788905266edd9803cd1cd5ce93b047562 against base 1efd2d45871f052ab791e4cd6f9d176533ef3b28.
  • Not done: no checkpoint or service operation was started to validate this repair.

🔗 Links

Closes #529. Part of #577; this does not close the checkpoint modernization umbrella.

Implemented with gpt-6.1-sol (high reasoning effort) through the Codex harness in T3 Code.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T22:45:27.255780Z bbd974b Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lastobelus lastobelus changed the title fix(lastcode): match wrapped checkpoint runs to their terminal state fix(lastcode): Wait for Checkpoint finds terminal state of wrapped runs Nov 2, 2026
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 56bd455788

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Match terminal scheduler and supervisor identities observed under the active launchd run. Preserve fail-closed handling for missing or unrelated state.

Carry-Group: incubator

Carry-Fix: #529
Carry-Observation: Extends scheduler-versus-supervisor attribution introduced in Incubator. The repair depends on that contribution adding launchdPid and separating those process identities.
@lastobelus
lastobelus force-pushed the t3/fix-checkpoint-waiter-false-no-state branch from 56bd455 to bbd974b Compare November 2, 2026 22:41
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@lastobelus

Copy link
Copy Markdown
Owner Author

Corrected the carry replay assignment in bbd974ba40bb48584a742096bd74fe86ad251269. This repair extends the scheduler/supervisor identity distinction and launchdPid field introduced by the existing Incubator contribution, so it must follow that prerequisite. The source commit records that dependency explicitly.

The final source/test tree is byte-for-byte identical to reviewed head 56bd455788905266edd9803cd1cd5ce93b047562. Exact same-base carry compilation now passes locally against 1efd2d45871f052ab791e4cd6f9d176533ef3b28. The earlier focused/runtime and managed Quick CI results apply to that unchanged tree; GitHub CI and review are being refreshed for the corrected head. No waiter behavior or assertion changed during this correction.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: bbd974ba40

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit e864910 into lastcode/main Nov 2, 2026
20 checks passed
@lastobelus
lastobelus deleted the t3/fix-checkpoint-waiter-false-no-state branch November 2, 2026 22:53
lastobelus added a commit that referenced this pull request Nov 2, 2026
## Problem

After carry compilation, `check:changed` can miss earlier integrated repairs. The retained compilation can rewrite ancestry, so a merge-base comparison may pick the wrong boundary. A diff against the last child then covers only the last patch. Earlier fixes in the same repair batch never reach lint, format, or affected-package checks.

## Fix

Add paired `--baseline <commit>` and `--candidate <commit>` options to the existing `check:changed`.

- **Diff:** a direct tree diff between the two endpoints, using their resolved full commit identities. Ancestry is not consulted.
- **Candidate guard:** the candidate must be the exact `HEAD` of a clean checkout with no pending Git operation. This is checked again after the checks finish, so a change mid-run fails.
- **Coverage:** every integrated repair path goes to the existing format, lint, and affected-package checks.
- **Unchanged:** ordinary positional-ref behavior, checkpoint fail-fast lint, final Full CI, exact candidate publication, and the separate advisory cache.

## Tests

The regression builds an unrelated rewritten snapshot with sequential and merged delegated repairs.

- It shows the last patch alone omits earlier paths.
- All 3 repair paths then reach lint, format, and affected-package selection.
- Also covered: invalid inputs, dirty, incomplete, or wrong candidate, and changes during the checks.

## Validation

- ✅ Regression failed before the implementation.
- ✅ Focused tests: 27 in the helper, 6 in the command.
- ✅ `scripts` typecheck, lint/format, knip, and `check:changed`.
- ✅ Parent-owned Quick CI passed on pre-rebase head `76fec5ea8f6c970d7f308a66839fe4295c5442df` against base `1efd2d45871f052ab791e4cd6f9d176533ef3b28`. That receipt is historical; current-head GitHub validation is required.
- ✅ Same-base carry compilation for PR #585: Carry-Group assignments validated; compiled tree equals head `83adda023db533f6b3a1dd17f7de53e7a9eeabab` on base `e864910bae68e7e1c1b99091b9ccca09c29b9089`.

Fresh changed-file checks and carry compilation passed after rebasing onto the #584 merge. Exact-head GitHub CI and Codex review are pending for `83adda023db533f6b3a1dd17f7de53e7a9eeabab`.

Related: #577 (not closed by this PR).

Implemented with GPT-6.1 Sol (high) through the Codex harness.

Carry-Source-Ref: refs/lastcode/carry-sources/pr-585/83adda023db533f6b3a1dd17f7de53e7a9eeabab
Carry-Source-Base: e864910
Carry-Source-Head: 83adda0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(actions): Wait for Checkpoint can miss terminal supervisor state

1 participant