Skip to content

feat(runtime): add parent-owned development lifecycle - #16

Merged
Punisheroot merged 1 commit into
mainfrom
feat/js/parent-owned-lifecycle
Aug 4, 2026
Merged

feat(runtime): add parent-owned development lifecycle#16
Punisheroot merged 1 commit into
mainfrom
feat/js/parent-owned-lifecycle

Conversation

@Punisheroot

Copy link
Copy Markdown
Contributor

Summary

Add the durable parent-owned development lifecycle requested by #4.

Needle now enforces the depth-one sequence explore -> implement -> test -> review -> verify -> apply, persists every transition, and requires approval bound to the latest verified state before active-worktree apply.

Closes #4

Implementation

  • Add a typed DevelopmentLifecycle domain with explicit phases, terminal outcomes, bounded artifacts, budgets, cancellation, and deterministic state digests.
  • Freeze source identity, role-profile revisions, and certified test plans for the complete run.
  • Keep review and verification separate, with distinct typed results and provenance.
  • Enforce depth one, maximum concurrency one, cumulative budgets, and a single repair transaction.
  • Add SQLite migration V16 with a durable lifecycle projection and append-only transition events written transactionally through the existing change journal.
  • Validate lifecycle state through deterministic replay and reject stale, corrupted, forged, or structurally impossible state.
  • Integrate patch persistence, repair, verification, apply, rollback, and recovery with lifecycle transitions.
  • Require explicit WebUser approval against the exact state, patch, and verification identities.
  • Prevent lifecycle changes from bypassing approval through the legacy verified-change apply path while preserving compatibility for existing non-lifecycle changes.

Validation

cd crates/needle-app/web
npm ci
npm run build
frontend build passed
cargo test --locked -p needle-core
69 passed
cargo test --locked -p needle-runtime
118 passed
cargo test --locked -p needle-platform-codex --test patcher_offline
3 passed
cargo test --locked --workspace
424 passed, 1 ignored
cargo test --locked -p needle-app
84 passed
cargo fmt --all -- --check
passed
git diff --check
passed

No provider calls were made.

Risks/limitations

  • This change provides the lifecycle contract, persistence, and safety boundaries; Codex process wiring and the lifecycle timeline API/UI remain separate follow-up work.
  • The lifecycle adds bounded projection and event writes to change-journal transactions. No dedicated performance benchmark was run.
  • npm ci reported three existing high-severity audit findings; this change does not modify frontend dependencies or the lockfile.
  • Provider-backed end-to-end lifecycle execution remains unverified because executor wiring is outside this issue.

Documentation/evidence

Updated:

  • docs/ARCHITECTURE.md
  • docs/ROADMAP.md
  • docs/VERIFIED_CHANGES.md
  • PROJECT_STATUS.md

The documentation distinguishes the implemented durable lifecycle boundary from the pending executor and control-plane UI.

AI assistance and human verification

AI assistance: Implemented the lifecycle domain and SQLite integration, added transition, restart, and adversarial coverage, and updated the related architecture and status documentation.
Human verification: I reviewed the complete diff and checked phase-order invariants, parent-only transitions, distinct review/verifier provenance, one-repair behavior, approval binding, journal atomicity, replay and tamper rejection, apply/rollback integration, compatibility with the existing verified-change path, and the reported validation results.

Ownership checklist

  • I read and understand the complete diff and can explain every material change.
  • I personally verified the reported tests and technical or performance claims.
  • I finalized and personally published the commits and this pull request.
  • I checked for unrelated edits, credentials, generated files, and live artifacts.
  • Public documentation and PROJECT_STATUS.md are updated when applicable.

@Punisheroot
Punisheroot merged commit 0cc951b into main Aug 4, 2026
2 checks passed
@Punisheroot
Punisheroot deleted the feat/js/parent-owned-lifecycle branch August 4, 2026 12:24
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.

Add the parent-owned depth-one Codex development lifecycle state machine

1 participant