Repository navigation
init: the database's password comes from the sealed env relay, not MMDS - #17
Merged
Merged
Conversation
The node generates it and the API stores only a sealed blob. PID 1 asks for it over the substrate vsock, writes it into the metadata file before the supervisor spawns, and fails closed when a substrate gives none. post_start's ALTER ROLE already runs on every start, so a fork's data directory takes this instance's value. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LBGuEttMZVcyx4YEaaAvWE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The node's postgres driver generates the superuser password and the Beyond API stores only a sealed blob, so MMDS no longer carries POSTGRES_PASSWORD. PID 1 now asks its driver for it over the substrate vsock it already owns, merges it into the metadata file before the supervisor spawns, and exits if a substrate gives none within 300 s (any password MMDS carried is dropped, never used). With no substrate at all (the Docker test image) the metadata file is used as it is.
post_startalready runsALTER ROLE postgres PASSWORDon every start, so a fork or restore, whose data directory carries the source's role hash, takes the new value: nothing else changes there.The wire (AppMessage
[0xE1]ask,[0xE2][msgpack {generation, vars}]answer) is mirrored from the Beyond repo'srustlib/wireenv.rs and pinned by tests. Tests:cargo test -p beyond-pg-init(40 pass). Docs: beyond-pg-init/ARCHITECTURE.md, DESIGN.md, DECISIONS.md.Reaches a node through a release tag and
dev/.scripts/publish-primitives.sh postgresin the Beyond repo (POSTGRES_INIT_URL/SHA256).🤖 Generated with Claude Code
https://claude.ai/code/session_01LBGuEttMZVcyx4YEaaAvWE