Repository navigation
feat(tools): import transcript-archive as a released command (RIG-11569) - #165
rigel-nemo[bot] merged 5 commits into
Conversation
Review round 1 at bfbdee6: 1 high, 1 medium, 2 low
A fix is dispatched. |
bfbdee6 to
6478229
Compare
Review round 2 at 6478229: 1 high, 1 medium
Fixed: M2 for |
6478229 to
794d6f2
Compare
|
All-clear at 794d6f2 All-clear at 794d6f2 Round 3: no findings. H1 and M2 are fixed. |
794d6f2 to
4a8c7d5
Compare
|
All-clear at 4a8c7d5 All-clear at 4a8c7d5 Rebase and secret-handling review: no findings.
|
|
Hold: Architect read pending. This PR handles the restic repository password, its escrow encryption, and S3 credentials. Nemo is holding the merge until the Architect has read it. The Architect lifts this with a |
|
Hold lifted: Architect read the diff at 4a8c7d5. The restic password reaches restic only through a 0600 --password-file. RESTIC_* is stripped from the child env, and restic stderr is discarded. No AWS values reach errors. Temp files are 0600 and removed. One Medium for a fix-forward, not a blocker: removeSecret (internal/retrieve/get.go:343) drops the os.Remove error, so a leftover plaintext restore password would pass silently. Merging. |
4a8c7d5 to
63f5094
Compare
|
Rebased onto main and resolved the flake.nix conflicts. New head: 63f5094. Changes since 4a8c7d5:
Checks, run off-box with flake.lock pinned: go test ./... in tools/transcript-archive gives 182 PASS, 0 FAIL, 1 SKIP, 9 packages ok. This head changed a sensitive path after the last all-clear, so it needs review before merge. |
|
Review round at
|
63f5094 to
12938aa
Compare
Ship transcript-archive as a released command, with no default config, recipient or host values. - --config and --escrow-recipient are required on inventory and pass. Nothing is defaulted, so a missing flag exits non-zero. - The CUE schema is embedded with go:embed. The config path is an input, and no archive.cue is imported. - Tests run against a synthetic testdata/archive.cue (example-host) and throwaway age keys generated per test. - Bucket, endpoint and secret paths are config or required inputs. Standard S3 and restic environment names are unchanged. - moon.yml, component.cue, README and the flake goCommands line follow the dl-claim shape. restic is a flake check tool for the tests. Co-authored-by: Matt Wilkinson <matt@rigel.build>
…tory flags (RIG-11569)
removeSecret dropped os.Remove errors. A leftover plaintext restore password or path list could pass silently. It now returns the error, and the three deferred callers join it into the function result. The error names only the operation and the path. It never carries file contents, and not-exist is still treated as success. Refs RIG-11569 Co-authored-by: Matt Wilkinson <matt@rigel.build>
…atch (RIG-11569) Restore batches cap at 5000 files, and each batch runs a restic pass over every snapshot node. A first run with many small unverified files paid one full pass per batch, so it took minutes on a large tree. Stream the digests when the unverified files exceed one batch, as well as when most bytes are unverified. The 60k-file regression test keeps its bounded-journal check. Reword the OMPVersion comment to name the pinned fork release by role, not by a file that exists only in the private repo. Co-authored-by: Matt Wilkinson <matt@rigel.build>
12938aa to
b8aca28
Compare
|
Updating: round-1 fixes pushed at b8aca28; review round 2 running before Ready (review-before-ready). |
|
All-clear at b8aca28 All-clear at b8aca28 Review round 2 found 0 high, 0 medium and 3 low.
L-B and L-C wait for the next change to this tool. |
|
Checks read:
|
What does this do
Import
transcript-archiveintotools/as a released command.removeSecretnow returns itsos.Removeerror, so a leftover plaintext restore password or path list fails the command instead of passing silently.This head also makes the first-run coverage check stream the snapshot once when unverified files span more than one restore batch. Before, each 5000-file batch ran a full restic pass.
Why do we need it
Hosts compile nothing, so the archive tool must ship as a nebula Release asset.
Summary
--configis required oninventoryandpass, with no default. The schema is embedded frominternal/config/schema.cue.--escrow-recipientis required, so no operator key is built in.flake.nix: onegoCommandsline,resticincheckTools, and atranscript-archivedevShell with restic.moon.yml:testruns in thetranscript-archivedevShell.removeSecretreturns the remove error;Getjoins it into its result.runStateCoveragestreams when unverified files exceed one restore batch, or when most bytes are unverified.Verification
Off-box on macpro2013, from
git archive, intools/transcript-archive, with no-timeoutflag (default 10m). The full suite (nix develop ../..#transcript-archive --command env CGO_ENABLED=0 go test -count=1 -v ./...) was last run on an identical tree before the final restack: 182 PASS, 0 FAIL, 1 SKIP, 9 packages ok.TestPassFirstRunManyPendingBoundedJournalatb8aca288aa3718626eb92173cde049375f89e1a7: 24.5s to 37.8s over three isolated runs. Before this round, it hit the 10m timeout.TestCoverageStateDirIncremental: passes.TestRemoveSecretReturnsRemoveError: fails on the pre-fixremoveSecretand passes on this head.Risks
Callers must now pass
--configand--escrow-recipient. Tests needresticon PATH.Spec impact
None.
Spec-impact: none
Checks skipped:
nebula has no pre-push hook config; GitHub Actions ci.yaml runs its checksRefs RIG-11569
Co-authored-by: Matt Wilkinson matt@rigel.build