Repository navigation
Slice 034: Export, import, restore - #43
Merged
Merged
Conversation
…measured, and the slice opens ROADMAP row 034 to in_progress. NOTES.md records VACUUM INTO at 9 ms over 8,029 messages and a 713 KB tarball for this machine's dev data, then the six-line build plan, the empty manual queue and two deviations stated before any code. plan_check: PASS. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…efore any write, the manifest Layout (the data directory's files by role, or the running app's), Manifest (format, app version, schema versions per database, keys included, a digest per file), export (each database snapshotted, the registry copied, private keys only with keys: true) and import (the manifest read, the schema versions checked against this binary's migration files, every digest verified against the tarball's bytes, a non-empty target refused or forced with what it replaced, then the files written and a RESTORED marker). Six tests on real files: AC1 and AC2 through dynamic repos on the restored databases, AC3 to AC6, the manifest's JSON. The first run refused this machine's test database, which carried 033's migration from another branch: the check works. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…ry on the code path :code.lib_dir/1 takes a code-path entry named <app>-<vsn> as the application's directory, so the prepended /tmp/trinity-policy-N made Application.app_dir(:trinity) point at /tmp for every later test; slice 034's migration listing came back empty. The directory is planted-policy-N and the path is removed on exit. The persona picker test reads the session it was redirected to rather than the newest row on disk. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…ownload, docs/backup.md mix trinity.export (--out, --keys, --data-dir) and mix trinity.import (--force, --data-dir), the import refusing a data directory a live Trinity holds (Lock.live_holder/1) before anything else. The first /settings page: the export as a download with and without the private key (ExportController), the data directory, links. docs/backup.md: what the archive holds and does not, the restore procedure, the size measured. Five tests. Signed-off-by: Ayla Croft <aylacroft@proton.me>
Signed-off-by: Ayla Croft <aylacroft@proton.me>
…rite; sobelow reasons Layout.safe_path?/1 accepts the two databases and relative paths under keys/, skills/ or personas/ with no dot segments; Manifest.verify refuses anything else as :unsafe_path before the digests, so keys/../../x from an archive is never resolved. A test plants one. The remaining file operations carry their reasons inline; the lock's new function sits at the file's end so the fingerprinted skips keep their lines. Signed-off-by: Ayla Croft <aylacroft@proton.me>
…ackup.md says what Postgres does Run 35553598612's postgres job had no SQLite file to snapshot. Signed-off-by: Ayla Croft <aylacroft@proton.me>
PROOF.md with every criterion's evidence by test name against run 35553822292 (gate, postgres and fips green). NOTES.md: eight findings, four follow-ups. ROADMAP row 034 to done; coverage.tsv row 78.83 %. Signed-off-by: Ayla Croft <aylacroft@proton.me>
Signed-off-by: Ayla Croft <aylacroft@proton.me>
The three conflicts were the export list in lib/trinity.ex (both sub-boundaries kept), the coverage rows (033 before 034) and the two ROADMAP rows (both done). Signed-off-by: Ayla Croft <aylacroft@proton.me>
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.
One gzip tarball with the two databases snapshotted by
VACUUM INTO(consistent, beside a running Trinity), the key registry, the private key only with--keys, and a manifest with a digest per file and the schema versions. The import checks the schema versions against this binary's migrations, verifies every digest and every path against the tarball's bytes before writing anything, refuses a non-empty directory unless--force(then says what it replaced) and a directory a live Trinity holds.mix trinity.export,mix trinity.import, the first/settingspage with the download,docs/backup.md. The receipt chain verifies after the round trip.Also carried:
fix(s030)for a test that put atrinity-*directory on the code path (it madeApplication.app_dir(:trinity)point at/tmpfor later tests). One real finding closed before the slice closed: a manifest path likekeys/../../xwould have resolved outside the layout; paths are validated before the digests now, with a planted test.PROOF.md at
slices/034-export-import-restore/PROOF.md.Signed-off-by: Ayla Croft aylacroft@proton.me