Skip to content

fix(runtime): preserve database claims and signal the recorded process birth - #199

Merged
antoinetoussaint-byte merged 4 commits into
mainfrom
fix/darwin-boot-id-repin-core
Oct 27, 2026
Merged

antoinetoussaint-byte merged 4 commits into
mainfrom
fix/darwin-boot-id-repin-core

Conversation

@antoinetoussaint-byte

@antoinetoussaint-byte antoinetoussaint-byte commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Native shared-server provisioning could overwrite an accepted service's credentials before rejecting a competing claim to the same database. Claim validation now runs under the existing server lock before role mutation, and a regression with distinct passwords proves the rejected claimant leaves the accepted service usable. Detached postmaster shutdown now consumes Core's birth-bound SignalProcess API instead of a check followed by bare-PID delivery.

Classification: fixes at the owners. Postgres owns claim ordering, shutdown signals and waits; Core owns boot/start identity and kernel-bound delivery. No local identity encoder or weaker birth test is introduced. docs/releases.md records the real native qualification requirements and shared API boundary; templates/agent/README.md.tmpl explains the native lifecycle behavior.

Final source 8e60f45 selects Core bc4e15ca through codefly agent deps --pin, with no workspace override. Supported standalone build, vet and tidy checks pass; final go test ./... -count=1 -timeout 10m passes in 420.235s. Earlier independent review at75c1881 exercised 17 real Nix lifecycle/isolation/refusal/collection/identity cases without skips and verified the original distinct-password failure before the fix. Fresh changed-pin review accepts the final owner composition. Exact-head GitHub image, restricted-postgres16 and build checks pass.

The aggregate local final suite log is not a claim that every optional Docker case ran; dedicated CI coverage and earlier named native evidence remain distinct. Stable Core v0.19.8 pin and v0.0.147 artifact publication/download qualification remain pending. No deployed playground or cloud rollout is claimed. Review evidence is retained in /tmp/core858-postgres-merge-review.md and /tmp/core858-consumer-provenance-followup.md.

antoinetoussaint-byte and others added 2 commits October 27, 2026 13:51
`processMark.alive()` compares the BootID it reads now against the BootID
recorded when the postmaster was marked, and reports the process dead unless
they are equal. At core v0.19.4 the Darwin BootID is `kern.boottime` as
`sec:usec`, and the kernel re-derives kern.boottime whenever the clock is set,
which `timed` does several times a day. So after any clock step every mark taken
before it reads as dead, and a live postmaster is reported gone.

Measured on one machine boot, same boot session: kern.boottime moved from
1792426260:726687 to 1792426260:782062, and a composed platform-obin run that
had been serving for four minutes was torn down with "the run's postgres server
(pid 4067) is gone" while pid 4067 was alive and logged a routine checkpoint
one second after the verdict.

core 0f9b2001 fixes this at the source, reading kern.bootsessionuuid, which is
minted once per boot and never rewritten. This repins core to a commit that
carries it. The Go directive moves 1.27.2 -> 1.27.3 because that core requires
it; nothing else changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antoinetoussaint-byte antoinetoussaint-byte changed the title fix(runtime): the run server's identity survives a clock step fix(runtime): preserve database claims and signal the recorded process birth Oct 27, 2026
@antoinetoussaint-byte
antoinetoussaint-byte merged commit e60852a into main Oct 27, 2026
3 checks passed
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.

1 participant