Skip to content

Fix active lifecycle generation supersession after fact drift - #159

Merged
Niko4417 merged 3 commits into
devfrom
codex/158-active-generation-supersession
Aug 2, 2026
Merged

Fix active lifecycle generation supersession after fact drift#159
Niko4417 merged 3 commits into
devfrom
codex/158-active-generation-supersession

Conversation

@Niko4417

@Niko4417 Niko4417 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Scope

Product and architecture alignment

  • The implemented contract version and fingerprint match the automated readiness record; no
    semantic planning change was absorbed during implementation.
  • The change follows the Decision Addendum, CONTEXT.md, accepted ADRs, and the issue Quality
    Plan.
  • Existing Keiko material was used only after a recorded Reuse Assessment, or the issue records
    why Existing Keiko evidence is not applicable.
  • This greenfield change creates no mandatory build-time or runtime dependency on Existing
    Keiko.
  • Product authority, policy, evidence, and privileged effects remain in their owning Native
    layer.
  • Any durable architecture change is recorded in an ADR.

Existing Keiko evidence is not applicable: this restores a repository-owned Native governance protocol already accepted by ADR-0004, ADR-0011, and ADR-0012. No durable architecture or schema changes were made.

Acceptance criteria and evidence

Acceptance criterion Evidence Exact head or artifact Result
AC1 Canonical issue-update time is anchored to the authenticated readiness record, so lifecycle record comments cannot recursively change generation; genuine PR/head drift emits one old-generation phase-fence-claim with claim_outcome: superseded and no effect 2848926da5e194a2bec938c5b78d90694b671125 Passed focused and full suites
AC2 Two failure-first tests preserve the production exception and the recursive timestamp defect, then prove one successor request bound to the authenticated supersession predecessor 2848926da5e194a2bec938c5b78d90694b671125 Passed
AC3 Semantic readiness changes still create a new generation; unchanged, stale, duplicate/reordered, recovery, malformed, authentication, and record-store paths remain green 2848926da5e194a2bec938c5b78d90694b671125 85 focused record tests and full coverage suite passed
AC4 Full local and required exact-head repository quality bars, native gates, package/signing/security composition, and audit 2848926da5e194a2bec938c5b78d90694b671125 Passed; protected #52 lifecycle rerun requires this PR's human merge

Acceptance journey evidence

  • Applicability: Not applicable — accepted issue #158 is a non-user-facing deterministic governance state-machine correction with no product UI or native runtime change.

  • Automated checks exercise user-visible outcomes rather than incidental implementation
    details.

  • Required failure, recovery, accessibility, visual, and platform observations are settled.

No user-visible journey is applicable. Failure, recovery, duplicate, stale, malformed, and zero-effect governance outcomes are exercised directly at the owning state-machine boundary; accessibility and visual observations are excluded by the accepted Quality Plan.

Quality Plan settlement

  • Applicable positive, negative, boundary, failure, cancellation, and recovery behavior is
    covered.
  • The actually wired production composition was tested where this change crosses layers.
  • Applicable security, accessibility, performance, resource, visual, and platform evidence is
    attached or linked.
  • Excluded quality areas retain the rationale accepted in the issue.
  • Secrets, credentials, raw customer content, private endpoints, and PII are absent from source,
    tests, logs, evidence, artifacts, issues, and this pull request.

Verification

  • npm ci --ignore-scripts
  • npm run quality
  • npm audit --audit-level=high
  • Every declared native target-specific gate passed on its authoritative platform.
  • I reviewed the complete diff against requirements, contracts, trust boundaries, and failure
    modes.

Additional affected checks and concise results:

Failure-first, before fixes:
  FAIL — TypeError: active generation does not match current facts
  FAIL — self-authored timestamp produced a different generation identity
node --test --test-name-pattern="self-authored issue timestamps do not change the active generation|active generation is superseded when authenticated facts change" quality/lifecycle-coordinator.test.mjs
  PASS — 2/2
node --test quality/lifecycle-coordinator.test.mjs quality/lifecycle-producer.test.mjs quality/lifecycle-record-*.test.mjs
  PASS — 85/85
npm run quality
  PASS — control-plane lines 94.61%, branches 87.95%, functions 94.71%; all native gates green
npm audit --audit-level=high
  PASS — 0 vulnerabilities
git verify-commit 2848926da5e194a2bec938c5b78d90694b671125
  PASS — verified ED25519 signature for niko.vasilopoulos96@gmail.com
Read-only production-composition replay against #52 authenticated history
  PASS — planned phase-fence-claim/request with claim_outcome=superseded,
  predecessor_comment_id=5153941785, old pull_request_number/exact_head_sha=null,
  and no external effect
Read-only Node 24.18.0 production-composition replay against #158 after the v2 evidence comment
  PASS — canonical issueUpdatedAt remained readiness-bound at 2026-08-02T03:46:53Z
  despite the later self-authored comment; genuine PR/head drift planned exactly one
  phase-fence-claim/request with claim_outcome=superseded and no external effect

Independent audit and findings

  • Audit scope and dimensions: complete four-file diff; state-machine ownership; old/current generation and source-observation binding; predecessor/fence sequence; duplicate/replay safety; coordinator/producer boundary agreement; preactivation zero effects; scope and delivery authority.
  • Audited commit: 2848926da5e194a2bec938c5b78d90694b671125
Confirmed finding Evidence Disposition Settlement evidence or follow-up
Sonar reported 11.5% new-code duplication from two repeated inert fence encoders on prior head fe8e0e6bc34408686ce2a09c63deb8bd8bdd9e2d Sonar PR #159 quality-gate result and duplication blocks in quality/lifecycle-coordinator.mjs Resolved by centralizing canonical inert fence encoding Exact-head Sonar passed with 98.8% new-code coverage, 0.0% duplication, zero issues, and zero security hotspots
Exact production-history replay showed GitHub advances raw issue updated_at when the workflow publishes its own lifecycle record, which would recursively request and supersede generations Authenticated #158 readiness and lifecycle record timestamps plus failure-first self-authored timestamp test Resolved by deriving canonical issue-update time from authenticated readiness authority while retaining raw provider validation Both failure-first tests, focused 85-test suite, complete local green bar, and semantic-readiness regression coverage passed on exact head 2848926da5e194a2bec938c5b78d90694b671125
  • Findings are evidence-cited; speculative observations are advisory rather than blockers.
  • Every confirmed finding is resolved, explicitly accepted by an authorized human, or linked to
    a scoped follow-up that does not invalidate current acceptance.
  • Verification and audit were repeated after the latest implementation or audit fix.

Integrated epic acceptance

  • Applicability: Not applicable — standalone defect; it unblocks but does not deliver or change epic #49's integrated acceptance surface.
  • Production-composition result: Full repository/native composition green locally.
  • Machine-enforced acceptance result: Focused and complete local gates green; all 13 required exact-head branch-protection checks passed.
  • macOS evidence: Full local macOS composition plus authoritative macos-14 and macos-26 native, package, platform, security, signing, test, and acceptance jobs passed.
  • Windows evidence: No platform/product code changed; exact-head Windows cross-platform smoke passed.
  • Manual usability, accessibility, visual, signing, or packaging evidence: Usability/accessibility/visual not applicable; deterministic internal-signing and packaging gates passed.

Delivery

  • Target path: epic/standalone -> dev
  • The target branch matches the delivery path accepted in the issue; no direct push, force
    push, gate bypass, finding dismissal, or authority widening occurred.
  • Commits are signed and every required check is bound to the exact current head and expected
    producer. Commits through 2848926da5e194a2bec938c5b78d90694b671125 have verified SSH signatures for niko.vasilopoulos96@gmail.com; GitHub verifies the exact head and all required exact-head checks passed.
  • Advisory tools are not treated as required merge authority under the current quality-gate
    policy.
  • Documentation, ADRs, contracts, known limitations, and follow-ups are current.
  • A draft pull request was not promoted to Ready for Human Review before every required
    Acceptance Journey result and exact-head gate was complete.

For this standalone dev-target pull request, only Niko or Oscharko may manually initiate merge. No
agent will enable auto-merge, enqueue, merge, or update dev.

Residual risks and follow-ups

Closes #158

@sonarqubecloud

sonarqubecloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

@Niko4417
Niko4417 marked this pull request as ready for review August 2, 2026 05:08
@Niko4417
Niko4417 requested a review from oscharko as a code owner August 2, 2026 05:08
@Niko4417

Niko4417 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

gitar review

@Niko4417
Niko4417 merged commit 1eea647 into dev Aug 2, 2026
84 of 90 checks passed
@Niko4417
Niko4417 deleted the codex/158-active-generation-supersession branch August 2, 2026 08:36
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.

Defect: active lifecycle generation cannot be superseded after fact drift

1 participant