fix: preserve owned task lifetime and original authority (#48) #69

Merged
kilo merged 19 commits from issue-48-task-lifetime into develop 2026-10-06 16:03:30 +00:00
Member

Refs #48.

Scope

Bounded existing owned-session repair under #47 Owned Sessions direction, no detached supervisor/new harness/intake/gateway policy/security expansion/live inference.

  • Keep dedicated CLI connection open across healthy running/waiting advancement; same durable turn and deadline. Ctrl-C performs recorded cancellation before owned teardown.
  • Preserve immutable original deadline/version/mode/source/repository/allocation binding/effort support; changed explicit envelope refuses, omitted CLI deadline recovers original. Legacy unsupported envelope fails safely without rewriting bytes.
  • Failed/interrupted terminal without candidate finishes durable Attempt/Operation, never accepts artifacts.
  • Expiry or explicit cancellation records a separate cancel intent/claim/uncertain receipt/target observations. Lost reply or crash never blindly reinterrupts; pending cancellation prevents late candidate acceptance. Descendant settlement remains explicitly unproven, workspace retained; cancellation not rollback.
  • Native turn dispatch rechecks authority after thread/start. Actual read/check/verification/admission timestamps replace pre-verification snapshot policy time; expired work remains observable but cannot start/accept new runtime work. Full auxiliary-effect/quota/cost enforcement remains #56.
  • Status adds original deadline, recorded condition and safe next actions, explicitly not a fresh native observation.

Evidence

Two native-shaped tests first reproduced existing version-recovery and terminal-no-candidate failures. Added restart/default-deadline, delayed healthy CLI, Ctrl-C, active cancel/lost reply, three cancellation crash boundaries, long verification and slow thread/start expiry timelines. Existing lost-send allocation tests remain unchanged and pass; authoritative exact-operation lookup recovers receipt only with validated original runtime resolution.

Sanitized env -i with synthetic HOME/TMPDIR and minimum locked offline tooling:

  • make check: PASS, 989 tests + 50 subtests; all repository-owned gates passed.
  • make package-check: PASS, rebuild/isolated install/installed CLI replay/export.
  • Focused allocation/CLI/task suite: 132 passed before final added slow-thread guard.
    No dependency/tooling changes, audit not required.

Base: 5048c5cef9
HEAD: 6e2d095f1c

Synthetic evidence is not live runtime/backend conformance, detached survival, sandbox attestation or product GO. No merge/deployment effect is exposed by task run. Fresh whole-PR independent review pending; /loop counter reserved separately.

Refs #48. ## Scope Bounded existing owned-session repair under #47 Owned Sessions direction, no detached supervisor/new harness/intake/gateway policy/security expansion/live inference. - Keep dedicated CLI connection open across healthy running/waiting advancement; same durable turn and deadline. Ctrl-C performs recorded cancellation before owned teardown. - Preserve immutable original deadline/version/mode/source/repository/allocation binding/effort support; changed explicit envelope refuses, omitted CLI deadline recovers original. Legacy unsupported envelope fails safely without rewriting bytes. - Failed/interrupted terminal without candidate finishes durable Attempt/Operation, never accepts artifacts. - Expiry or explicit cancellation records a separate cancel intent/claim/uncertain receipt/target observations. Lost reply or crash never blindly reinterrupts; pending cancellation prevents late candidate acceptance. Descendant settlement remains explicitly unproven, workspace retained; cancellation not rollback. - Native turn dispatch rechecks authority after thread/start. Actual read/check/verification/admission timestamps replace pre-verification snapshot policy time; expired work remains observable but cannot start/accept new runtime work. Full auxiliary-effect/quota/cost enforcement remains #56. - Status adds original deadline, recorded condition and safe next actions, explicitly not a fresh native observation. ## Evidence Two native-shaped tests first reproduced existing version-recovery and terminal-no-candidate failures. Added restart/default-deadline, delayed healthy CLI, Ctrl-C, active cancel/lost reply, three cancellation crash boundaries, long verification and slow thread/start expiry timelines. Existing lost-send allocation tests remain unchanged and pass; authoritative exact-operation lookup recovers receipt only with validated original runtime resolution. Sanitized `env -i` with synthetic HOME/TMPDIR and minimum locked offline tooling: - `make check`: PASS, 989 tests + 50 subtests; all repository-owned gates passed. - `make package-check`: PASS, rebuild/isolated install/installed CLI replay/export. - Focused allocation/CLI/task suite: 132 passed before final added slow-thread guard. No dependency/tooling changes, audit not required. Base: 5048c5cef95e546377d5e20baeae16b99b1bd088 HEAD: 6e2d095f1ce9b8aaa6fe8a109ef1c645a2d89720 Synthetic evidence is not live runtime/backend conformance, detached survival, sandbox attestation or product GO. No merge/deployment effect is exposed by task run. Fresh whole-PR independent review pending; /loop counter reserved separately.
fix: preserve owned task lifetime and original authority (#48)
All checks were successful
ci / check (pull_request) Successful in 1m12s
6e2d095f1c
fix: journal cancellation before teardown and recover receipt targets (#48)
Some checks failed
ci / check (pull_request) Failing after 1m6s
b069bcedfa
fix: persist cancellation on startup authority refusal (#48)
Some checks failed
ci / check (pull_request) Failing after 1m6s
a252915e09
fix: persist observed cancellation and reconcile terminal attempts (#48)
Some checks failed
ci / check (pull_request) Failing after 1m6s
0624be9fba
fix: journal pending stop before owned transport cleanup (#48)
Some checks failed
ci / check (pull_request) Failing after 1m8s
fcfbcef437
fix: recover cancellation before runtime dispatch (#48)
All checks were successful
ci / check (pull_request) Successful in 1m15s
352d8bd636
fix: pin original fixed allocation before preparation (#48)
Some checks failed
ci / check (pull_request) Failing after 1m8s
e7b6eb7825
Merge branch 'develop' into issue-48-task-lifetime
Some checks failed
ci / check (pull_request) Failing after 1m7s
7d3297f263
fix: recover terminal facts and cancel unclaimed attempts (#48)
All checks were successful
ci / check (pull_request) Successful in 1m17s
063b64dd8c
fix: reconcile terminal evidence without inventing candidate absence (#48)
Some checks failed
ci / check (pull_request) Failing after 1m10s
4482eb4eea
fix: latch durable stop and replay terminal cancellation (#48)
Some checks failed
ci / check (pull_request) Failing after 1m10s
cf16807083
Author
Member

STOP_REVISE

Same invocation kernel-loop-20261005T102040Z stopped at the 10/10 whole-PR review bound. Current exact HEAD cf168070830659e95813b70327e6ebb8ed52c015; base/merge base 72aedfd51e357f52e90c58f1302f60bc0a92f0dd. Ordinals 1-10 all REQUEST_CHANGES; no current approval, no merge/closure or next selection. Clean issue branch and all normal commits/owner maintenance merge preserved; no reset, review11 or further unreviewable patch.

Final remaining P1: accumulated unread native progress notifications can overflow CodexStdio's bounded buffer and terminate healthy work. Final P2: required Kernel lifecycle partial-shutdown and foreign/shared-process negatives are missing. Local parent/reviewer required gates PASS (1010 tests + 50 subtests, package-check), but exact-head CI #2268 reports failure and accepted issue completion is not proved.

Complete frozen review history, classifications, commits/limitations and evidence: #48 (comment). This supersedes the original pending-review status. Prior #47/#66 was merged, verified and closed independently; this PR remains an unapproved experiment, not product GO.

## STOP_REVISE Same invocation `kernel-loop-20261005T102040Z` stopped at the **10/10** whole-PR review bound. Current exact HEAD `cf168070830659e95813b70327e6ebb8ed52c015`; base/merge base `72aedfd51e357f52e90c58f1302f60bc0a92f0dd`. Ordinals 1-10 all REQUEST_CHANGES; no current approval, no merge/closure or next selection. Clean issue branch and all normal commits/owner maintenance merge preserved; no reset, review11 or further unreviewable patch. Final remaining P1: accumulated unread native progress notifications can overflow CodexStdio's bounded buffer and terminate healthy work. Final P2: required Kernel lifecycle partial-shutdown and foreign/shared-process negatives are missing. Local parent/reviewer required gates PASS (1010 tests + 50 subtests, package-check), but exact-head CI #2268 reports failure and accepted issue completion is not proved. Complete frozen review history, classifications, commits/limitations and evidence: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/issues/48#issuecomment-15158. This supersedes the original pending-review status. Prior #47/#66 was merged, verified and closed independently; this PR remains an unapproved experiment, not product GO.
fix: bound task progress and verify owned descendant cleanup (#48)
Some checks failed
ci / check (pull_request) Failing after 1m8s
0ad9e1d4a2
Author
Member

Cycle-2 remediation pushed normally as 0ad9e1d4a23394a8c66ec6b3eb09e41d8c78d4b3; no history rewrite. Local sanitized make check PASS (1020 tests + 50 subtests), package-check/audit/diff-check PASS; committed transport/task/CLI suite 114 passed. Native-framed progress and real owned/foreign process lifecycle regressions added; durable descendant settlement remains unproven and workspace retained.

BLOCKED before cycle-2 review: exact-head canonical CI #2317 (UI run108) fails, as did #2268; actual failing step/error remains unavailable through supported v15 log access. MCP jobs returns404, UI redirectslogin, status resource gives duration only. No local-pass substitution, blind CI rerun, credential access or merge. Cycle2 stays0/10; prior cycle1 ten reviews/STOP_REVISE preserved. Current base 9dfa20931a46931d1e97d1f0efddcf2692afb7a7, merge base 72aedfd51e357f52e90c58f1302f60bc0a92f0dd.

Full findings/remediation/validation and exact missing external log capability: #48 (comment) . PR and issue remain open/unmerged; same invocation kernel-loop-20261005T102040Z stopped, no next issue selection.

Cycle-2 remediation pushed normally as `0ad9e1d4a23394a8c66ec6b3eb09e41d8c78d4b3`; no history rewrite. Local sanitized `make check` PASS (1020 tests + 50 subtests), package-check/audit/diff-check PASS; committed transport/task/CLI suite 114 passed. Native-framed progress and real owned/foreign process lifecycle regressions added; durable descendant settlement remains unproven and workspace retained. **BLOCKED before cycle-2 review:** exact-head canonical CI #2317 (UI run108) fails, as did #2268; actual failing step/error remains unavailable through supported v15 log access. MCP jobs returns404, UI redirectslogin, status resource gives duration only. No local-pass substitution, blind CI rerun, credential access or merge. Cycle2 stays0/10; prior cycle1 ten reviews/STOP_REVISE preserved. Current base `9dfa20931a46931d1e97d1f0efddcf2692afb7a7`, merge base `72aedfd51e357f52e90c58f1302f60bc0a92f0dd`. Full findings/remediation/validation and exact missing external log capability: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/issues/48#issuecomment-15335 . PR and issue remain open/unmerged; same invocation `kernel-loop-20261005T102040Z` stopped, no next issue selection.
Author
Member

Cycle 2 Review 1/10: APPROVE, no findings

Fresh independent foreground native review ses_eeffd0d20ffediJkeZtyt6OaIM reviewed the COMPLETE accumulated PR at exact HEAD 0ad9e1d4a23394a8c66ec6b3eb09e41d8c78d4b3, current canonical base 9dfa20931a46931d1e97d1f0efddcf2692afb7a7, historical merge base 72aedfd51e357f52e90c58f1302f60bc0a92f0dd. Verdict APPROVE, findings []. Cycle 1 remains immutable at 10/10; cycle 2 has consumed 1/10.

Owner-authorized detached validation-only prospective merge: fa271df8734a6244c9dd11c3cb0557a97d3ac8b8, tree 2dd86e3bb5591369808b6a2dca7d4c241f7450b0, parents current develop + exact PR HEAD. Conflict-free; published branch unchanged. Reviewer independently verified all objects, complete delta, acceptance, source/reuse/license and final Git/MCP currentness, and reran sanitized make check package-check: 1022 tests + 57 subtests, all repository and installed-package gates PASS. Parent also reproduced uv sync --locked, exact workflow .ci-sqlite-storage behavior and make audit PASS with uv0.9.30/Python3.12.3, then independently reproduced all workflow gates with fresh uv-managed Python3.12.12 on Ubuntu24.04.5, synthetic HOME/TMP/cache; 1022 tests + 57 subtests and package/audit PASS.

These are exact prospective-content checks, not canonical runner attestation. Exact-head Forgejo CI #2317 still reports failure; no failing step/error is asserted, and approval does not waive required CI. Additional pinned checkout/setup-action compatibility diagnosis is in progress. No product patch, merge, issue closure, blind rerun, new cycle or live inference occurred. Approval covers bounded synthetic owned-session repair, not detached survival, hostile isolation, native/backend live reception or complete descendant settlement.

## Cycle 2 Review 1/10: APPROVE, no findings Fresh independent foreground native review `ses_eeffd0d20ffediJkeZtyt6OaIM` reviewed the COMPLETE accumulated PR at exact HEAD `0ad9e1d4a23394a8c66ec6b3eb09e41d8c78d4b3`, current canonical base `9dfa20931a46931d1e97d1f0efddcf2692afb7a7`, historical merge base `72aedfd51e357f52e90c58f1302f60bc0a92f0dd`. Verdict **APPROVE**, findings `[]`. Cycle 1 remains immutable at 10/10; cycle 2 has consumed 1/10. Owner-authorized detached validation-only prospective merge: `fa271df8734a6244c9dd11c3cb0557a97d3ac8b8`, tree `2dd86e3bb5591369808b6a2dca7d4c241f7450b0`, parents current develop + exact PR HEAD. Conflict-free; published branch unchanged. Reviewer independently verified all objects, complete delta, acceptance, source/reuse/license and final Git/MCP currentness, and reran sanitized `make check package-check`: **1022 tests + 57 subtests**, all repository and installed-package gates PASS. Parent also reproduced `uv sync --locked`, exact workflow `.ci-sqlite-storage` behavior and `make audit` PASS with uv0.9.30/Python3.12.3, then independently reproduced all workflow gates with fresh uv-managed Python3.12.12 on Ubuntu24.04.5, synthetic HOME/TMP/cache; **1022 tests + 57 subtests** and package/audit PASS. These are exact prospective-content checks, not canonical runner attestation. Exact-head Forgejo CI #2317 still reports failure; no failing step/error is asserted, and approval does not waive required CI. Additional pinned checkout/setup-action compatibility diagnosis is in progress. No product patch, merge, issue closure, blind rerun, new cycle or live inference occurred. Approval covers bounded synthetic owned-session repair, not detached survival, hostile isolation, native/backend live reception or complete descendant settlement.
Merge commit '9dfa20931a' into issue-48-task-lifetime
Some checks failed
ci / check (pull_request) Failing after 1m12s
d688b7cd31
fix: reconcile dispatched PR effects after task stop (#48)
Some checks failed
ci / check (pull_request) Failing after 1m11s
932d39aae8
fix(ci): download public uv without Forgejo authentication (#48)
Some checks failed
ci / check (pull_request) Failing after 1m13s
856b905808
fix: record terminal handles without fabricating model identity (#48)
Some checks failed
ci / check (pull_request) Failing after 1m14s
3807efe477
fix: reject fresh expired deadlines before durable initialization (#48)
Some checks failed
ci / check (pull_request) Failing after 1m14s
d183007881
Author
Member

Current Delivery Gate: BLOCKED, Independent Review Approved

Same invocation kernel-loop-20261005T102040Z; cycle 1 history remains 10/10, cycle 2 6/10. Fresh full-PR review 6 native result ses_eef8f8e9cffepKbIOag547qF3R: APPROVE, findings [], exact HEAD d183007881ccaf83cc5b5f3c53a8478915e5bcba, canonical develop/base/merge base 9dfa20931a46931d1e97d1f0efddcf2692afb7a7, tree 3575bc016afd21fc9e834ded98e588e4a2b12c84. Final MCP/Git currentness matches; normal and one authorized detached checkout clean.

Current-base prospective integration was actually constructed and verified; normal target merge incorporated that same tested tree without rewriting history. All new actionable independent findings were reproduced and repaired normally: original PR-effect reconciliation after stop, terminal no-candidate recovery without fabricating model resolution, and invalid fresh-deadline rejection before state initialization. Pinned CI public download now avoids forwarding Forgejo automatic authentication; the concrete compatibility probe and its limits are recorded.

Current exact-head action-shaped locked uv sync --locked, make check, make package-check, make audit PASS (1038 tests + 57 subtests); independent reviewer reran all gates successfully. Prior material shallow/non-root Ubuntu24.04 container reproduction also passed, with exact frozen Git objects and native storage, without owner credential mounts.

Canonical required CI still FAILURE: run #2322/UI113, exact current HEAD, ci / check (pull_request), 1m14s: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/actions/runs/113 . No actual failing step/root cause is invented. Accessible supported v15 job diagnostics are unavailable; local green/independent approval do not replace this gate. Remaining external condition is actual authenticated Actions job/runner diagnostics or repaired canonical execution permitting targeted diagnosis and verified success. No blind retry, extra unchanged review, access expansion, check weakening or force/auto-merge.

Therefore no merge attempt, closure or next SELECT. All six cycle-2 ordinals and ten cycle-1 reviews remain preserved; four cycle-2 review slots remain but no further unchanged review can solve the CI evidence gate. Detailed immutable current report, commands/reproduction strategy and history: #48 (comment) . No architecture or ordinary merge-permission question is pending.

## Current Delivery Gate: BLOCKED, Independent Review Approved Same invocation `kernel-loop-20261005T102040Z`; cycle 1 history remains 10/10, cycle 2 **6/10**. Fresh full-PR review 6 native result `ses_eef8f8e9cffepKbIOag547qF3R`: **APPROVE, findings []**, exact HEAD `d183007881ccaf83cc5b5f3c53a8478915e5bcba`, canonical develop/base/merge base `9dfa20931a46931d1e97d1f0efddcf2692afb7a7`, tree `3575bc016afd21fc9e834ded98e588e4a2b12c84`. Final MCP/Git currentness matches; normal and one authorized detached checkout clean. Current-base prospective integration was actually constructed and verified; normal target merge incorporated that same tested tree without rewriting history. All new actionable independent findings were reproduced and repaired normally: original PR-effect reconciliation after stop, terminal no-candidate recovery without fabricating model resolution, and invalid fresh-deadline rejection before state initialization. Pinned CI public download now avoids forwarding Forgejo automatic authentication; the concrete compatibility probe and its limits are recorded. Current exact-head action-shaped locked `uv sync --locked`, `make check`, `make package-check`, `make audit` PASS (**1038 tests + 57 subtests**); independent reviewer reran all gates successfully. Prior material shallow/non-root Ubuntu24.04 container reproduction also passed, with exact frozen Git objects and native storage, without owner credential mounts. **Canonical required CI still FAILURE:** run #2322/UI113, exact current HEAD, `ci / check (pull_request)`, 1m14s: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/actions/runs/113 . No actual failing step/root cause is invented. Accessible supported v15 job diagnostics are unavailable; local green/independent approval do not replace this gate. Remaining external condition is actual authenticated Actions job/runner diagnostics or repaired canonical execution permitting targeted diagnosis and verified success. No blind retry, extra unchanged review, access expansion, check weakening or force/auto-merge. Therefore no merge attempt, closure or next SELECT. All six cycle-2 ordinals and ten cycle-1 reviews remain preserved; four cycle-2 review slots remain but no further unchanged review can solve the CI evidence gate. Detailed immutable current report, commands/reproduction strategy and history: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/issues/48#issuecomment-15395 . No architecture or ordinary merge-permission question is pending.
test: isolate CLI polling interrupt from subprocess waits (#48)
All checks were successful
ci / check (pull_request) Successful in 1m21s
88d4d80d33
fix: sample authority clocks after cancellation polling (#48)
All checks were successful
ci / check (pull_request) Successful in 1m23s
8b995c1d88
kilo merged commit cb4afda2f1 into develop 2026-10-06 16:03:30 +00:00
Author
Member

COMPLETE under the same invocation kernel-loop-20261005T102040Z. Cycle 2 ordinal9 native result ses_eee17a736ffetc736kbXpR93Ir APPROVE/findings[] matched exact HEAD 8b995c1d88df0fe10b320bfcdf632053adba5e42 and base 9dfa20931a46931d1e97d1f0efddcf2692afb7a7; exact-head canonical CI2328 succeeded. Supported non-force/non-auto stylemerge produced cb4afda2f1e2f9bc29bda202a3b9924e861a738e, parents exactly base+HEAD, tree identical to reviewed HEAD; ancestry and merged metadata verified.

Integrated develop locked-sync/check/package/audit/diff allPASS, 1042 tests + 57 subtests; integrated push CI2331/UI116 succeeded. #48 closed only after integrated acceptance evidence, and closure independently re-read. Normal checkout clean on current develop; completed authorized temp worktree retired. Cycle1 ten/cycle2 nine and prior failures/COMMENT preserved, not reset.

CLI shared-sleep test isolation correction, 20/20 affected repeats and all startup/RPC cases passed. Subsequent separate deadline-poll ordering finding was reproduced at four boundaries and repaired before fresh review. No weakening of CI or product cancellation semantics to satisfy the timing-dependent test.

Full integrated acceptance and evidence: #48 (comment) . Same invocation now resumes fresh full canonical SELECT; no live inference/main/release/deploy/security expansion.

COMPLETE under the same invocation `kernel-loop-20261005T102040Z`. Cycle 2 ordinal9 native result `ses_eee17a736ffetc736kbXpR93Ir` APPROVE/findings[] matched exact HEAD `8b995c1d88df0fe10b320bfcdf632053adba5e42` and base `9dfa20931a46931d1e97d1f0efddcf2692afb7a7`; exact-head canonical CI2328 succeeded. Supported non-force/non-auto stylemerge produced `cb4afda2f1e2f9bc29bda202a3b9924e861a738e`, parents exactly base+HEAD, tree identical to reviewed HEAD; ancestry and merged metadata verified. Integrated develop locked-sync/check/package/audit/diff allPASS, **1042 tests + 57 subtests**; integrated push CI2331/UI116 succeeded. #48 closed only after integrated acceptance evidence, and closure independently re-read. Normal checkout clean on current develop; completed authorized temp worktree retired. Cycle1 ten/cycle2 nine and prior failures/COMMENT preserved, not reset. CLI shared-sleep test isolation correction, 20/20 affected repeats and all startup/RPC cases passed. Subsequent separate deadline-poll ordering finding was reproduced at four boundaries and repaired before fresh review. No weakening of CI or product cancellation semantics to satisfy the timing-dependent test. Full integrated acceptance and evidence: https://forgejo.creatidy.com/Creatidy/creatidy-kernel/issues/48#issuecomment-15442 . Same invocation now resumes fresh full canonical SELECT; no live inference/main/release/deploy/security expansion.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Creatidy/creatidy-kernel!69
No description provided.