Skip to content

feat(core,dg): environments lite — encrypted per-environment config with dg env - #397

Merged
PastaPastaPasta merged 27 commits into
masterfrom
feat/mv1-env
Oct 5, 2026
Merged

PastaPastaPasta merged 27 commits into
masterfrom
feat/mv1-env

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

What

Environments lite (mixed-visibility DESIGN stream 1I: §4.5, D9, D23, D24, §10; security review H5/M2, product review H7/M4): per-environment configuration and secrets kept outside git, encrypted for Maintainers or Members, changed only by maintainers, injected with dg env run.

Builds on #392 (crypto) and #395 (lane), both merged; the diff against master is env only (61 files, roughly half of it vectors and tests).

forge-core env/

  • format: the artifact is canonical JSON {"audience","env","generatedAt","savedFor"?,"to"?,"v":1,"vars":{NAME:{"note"?,"type","value"}}} (savedFor: the removed maintainer whose values a re-save carries) padded with spaces to 512-byte buckets (max 12,288 B, so always one Platform chunk). A reader takes only the exact canonical bytes (parse, check, re-encode, compare), so Rust, TS and Python agree on duplicate keys, escapes, numbers, U+2028, astral characters and lone surrogates. .env parse/render: values are bare, single-quoted or double-quoted with \, ", $ and backticks escaped, so source .env never runs anything inside a value.
  • codec: Members = DFPK 0x01 under the members key at the write epoch; Maintainers = DFPK 0x02 to the current maintainers' highest usable ENCRYPTION keys, the writer first. Open in D24's order: the bytes must hash to the owner-signed manifest's packHash before anything is decrypted, then the envelope (0x02's sender key taken from that manifest's $ownerId only), then the content must agree with its envelope (audience matches the version byte; to lists the owner first and has one entry per slot).
  • chain: strict D24. Only a current maintainer's snapshot counts. Every other manifest is ignored, and neither its values nor its links are used. Links count only between counted snapshots, strictly back in $createdAtBlockHeight, and within one environment, so there are no self-links, forward links or cycles. Order is by block height.
    • Heads: one readable head = current; one unreadable head = the latest change is not readable here (never served from an older snapshot); two or more = conflict, fail closed, never auto-merged (E608). A fork is resolved by a snapshot superseding every head.
    • Each new snapshot's supersedes window (max 32): the current heads, then the newest snapshot by each other author, then the newest of the rest. chain::window / supersedesWindow, with a vector for a run of 32+ by one maintainer.
    • chain::changed(before, after): which environments' heads change, vanish or appear between two resolutions, the dry run behind removal and promotion.
    • Non-blocking visibility: an ignored manifest that names an environment's counted head from a higher block is reported (ignoredNewer). It is never used and never offered to be saved.
  • service: read every snapshot of a repo and save one (prepare = maintainer check + seal; store = one chunk + one kind-8 packManifest).
  • pack/manifest.rs: KIND_ENV_SNAPSHOT = 8, for_env_snapshot, plan_supersedes never plans for kind 8. repo.rs: store_env_snapshot.
  • One default-audience constant, env::MAINTAINERS_BY_DEFAULT = ["production", "prod*", "staging", "release*"]. Runners are not lane members (the lane's rule); they get environments only as Specific people in phase 2.

dg

dg env ls [--env] | get | set NAME[=value]… [--secret] | unset | edit | import .env | run -- cmd | export [-o .env] | history, with --audience and --keep <id> (resolve a fork). Only maintainers can write.

  • Reads: ls masks values and shows who saved the version in use and when. ls, get, run and export print one warning line when an ignored change names the head, with its author, time and id: "production has a newer change by at 2026-10-05 14:55 UTC (7JLyoZc2GU), who isn't a maintainer now; it was ignored. Ask a maintainer to check production's values." history lists ignored changes and marks re-saves saved again for <member>.
  • Writes: resolving means more than one head; a set/edit that changes nothing (and resolves nothing) saves nothing.
  • set: with no value it prompts (hidden) or reads one value from stdin. Several names, import and edit are one snapshot each.
  • run: injects into the child only and passes its exit code through. Without --allow-env-override it refuses any entry that shadows a variable the parent already has, and always PATH, HOME, XDG_CONFIG_HOME, BASH_ENV, ENV, ZDOTDIR, SHELLOPTS, PS4, SHELL, NODE_OPTIONS, NODE_PATH, PYTHONPATH, PYTHONHOME, PERL5OPT, PERL5LIB, RUBYOPT, RUBYLIB, JAVA_TOOL_OPTIONS, JAVA_OPTIONS, JDK_JAVA_OPTIONS, RUSTC_WRAPPER and the prefixes LD, DYLD_, GIT_, npm_config_ (case-insensitive on Windows).
  • export -o: before writing, adds /<path> to .git/info/exclude (pattern characters escaped), checks git check-ignore (which works on a path that doesn't exist yet), and refuses a tracked file (also a letter-case-only match) or a path git would not ignore. Inside a work tree where git can't run it fails closed (E206). ls-files runs with --literal-pathspecs (check-ignore takes plain paths and refuses that option). It then writes 0600. --force replaces a symlink via a temp file and rename instead of following it. Without -o it prints .env text for piping.
  • edit: while the editor runs, Ctrl-C and Ctrl-\ go to the editor and dg ignores them (tokio signals; no unsafe code); default handling is restored when it exits. The temporary file is removed after a hangup or termination too. The docs mention editor swap and backup copies.
  • Errors: a fork fails run/get/export closed with E608, listing every head (id, author, time) and pointing to dg env history, without pre-filling a --keep id; heads with no shared earlier version are reported as separate histories. A fetch failure is E503, not a key error.
  • Copy: per §10. "Members"/"Maintainers", the Members sentence and "Access is granted, not logged."; never sealed/lane/named/restricted.

dg collab remove prints the removal checklist: environments and current value names the member could read, plus a note on how many environments the remover can't read. For a maintainer it dry-runs the resolution without them and compares it per environment:

  • every environment whose heads change gets a planned re-save: a current one with their head is saved again with their values (savedFor), superseding the predicted heads; in a conflict, each head of theirs is saved again linked to the counted versions it came from, so it stays one of the versions without starting a separate history. The confirmation shows each, values hidden, with the cost;
  • the re-saves have their own confirmation; --no-resave skips them and still names the environments that change;
  • after the rotation each is saved only if the environment still has the predicted heads (checked for all before any write);
  • environments the remover can't read are listed with "ask a maintainer who can read it"; conflicted environments are not counted as unreadable.

dg collab add --role maintainer dry-runs the resolution with the new maintainer counted. If their earlier (ignored) snapshots would change any environment, it first saves the current values again as the promoter, naming the current heads and the predicted heads (their dormant snapshots) as replaced, and lists those environments with the cost in the confirmation. Their environments nobody could use before are listed as appearing.

forge-web membership guard

lib/repo/writes.ts: removing, demoting or making a maintainer of a repo that has a kind-8 manifest is refused before anything is written ("This repo has environments. Remove or demote maintainers with dg for now." / "Make maintainers with dg for now."), with one cheap newest-manifest-of-kind query. PACK_KIND.ENV_SNAPSHOT = 8. Test: lib/repo/environments-guard.test.ts.

forge-web lib/env/ (codec only, no UI)

encodeSnapshot/decodeSnapshot, openSnapshot (same D24 order), sealMembersSnapshot/sealMaintainersSnapshot, resolveSnapshots (strict, with ignoredNewer), supersedesWindow, changedEnvironments, exposureOf, defaultAudience, the two sentences. The web UI stream builds Settings → Environments on it. It still needs a loader (kind-8 manifests, maintainers, owner keys, artifact fetch); the web refuses maintainer changes in repos with environments until it plans and saves like dg.

Vectors

26 env_snapshot__* from a sibling generator, tools/private-repos-vectors/env.py (reuses gen.py's crypto; owns only env_snapshot__*.json; names checked with re.fullmatch): padding, decode_refused (now with a duplicate key, uppercase \u, escaped astral, raw U+2028 and astral accepted, -0, 1e3, a trailing-newline name), members, maintainers_named, sender_not_owner, pack_hash_mismatch, audience_mismatch, chain_{linear,fork,two_roots,resolved,cycle} (cycle: self-link, forward link, same-block links), unauthorized_writer_ignored, post_demotion_snapshot_ignored, writer_reuses_pack_hash, removed_maintainer_mid_chain, unreadable_head, hidden_environment, duplicate_copy, cross_environment_link_dropped, window, long_run_by_removed_maintainer, promotion_unprotected, promotion_protected, removal_checklist, default_audience; padding and decode_refused cover savedFor. Rust (env::conformance) and TS (lib/env/conformance.test.ts) reproduce every one byte for byte; both rules harnesses skip the prefix.

Docs and e2e

docs/guides/environments.md (audiences, commands, the ignored-change warning, conflicts, removal, what is public, limits) for the docs stream to link. docs/errors.md: E608. e2e scenario 40 (renumbered: master took 39) (import → run → export -o → git check-ignore, non-maintainer refused).

Review round (the lead's findings)

  • Reversed: the former-maintainer evidence, the snapshot maintainers field, E609, dg env resave and all link-following through ignored manifests. A demoted maintainer who is still a writer could block every environment with one manifest and get maintainers to re-sign their values. Any writer could end a fork by reusing a packHash, since the unique index is per owner. None of that works now: a writer's manifest is never a link.
  • Test hooks: DASH_FORGE_TEST_ENV_ANY_WRITER and DASH_FORGE_TEST_ENV_SUPERSEDES are now #[cfg(debug_assertions)] items, absent from release builds, and used by live QA only.

Review round 2 (13 items, all fixed)

  1. Promotion pre-save (above), vectors promotion_*. 2. Window split and removal by dry run (above), vector long_run_by_removed_maintainer. 3. E608 wording. 4. Resolving = more than one head; no-op saves nothing. 5. Web guard. 6. --no-resave, separate confirmation, saved again for. 7. run shadowing and start-up variables. 8. export fail-closed, literal pathspecs, case collisions. 9. Signal handling restored after the editor. 10. Warning author/time/id; ignored changes in history. 11. E503 for fetch failures. 12. Members snapshots follow the late-content rule (manifest_standing). 13. Conflicted environments not counted as unreadable.

Live QA found one more bug, now fixed: a removed maintainer's version in a conflict was saved again without its counted ancestors, so the environment read as separate histories. A unit test builds the book and checks the post-removal resolution for that case and the current-head case.

How tested

Gates at 31906a2 (origin/master a7d6438 merged, which includes #395 and #398; then the lead's simplification pass 5d425fe and the collab add prompt stating the pre-save before its question, checked live in r4/90-promote-prompt-order.txt), under the cargo lock, staleness touch, no debuginfo:

  • cargo fmt --all -- --check ok; cargo clippy --workspace --all-targets -- -D warnings ok.
  • cargo test --workspace: 1,849 passed, 0 failed.
  • forge-web: tsc --noEmit ok, npm run lint ok, npm run lint:copy clean, vitest run 383 files / 6,219 passed. (An earlier full run had one timeout in lib/auth/key-safety.test.ts, a file this branch doesn't touch; it passes alone and in the final run.)
  • env.py --write-vectors and gen.py --write-vectors reproduce the committed vectors (0 changed files); forge-contracts/schema/vectors.py --check ok.

Live QA on devnet sakura (identities maint1, maint2, writer, reader, outsider; fake values only):

  • Round 1 (…/mv1-env-qa-0831, dash-forge-qa/evidence/mv1/env/README.md, transcripts 01-97):
    • production set, read and refused (E601 for a writer's write);
    • run injects; export -o gives 0600, the exclude entry and git check-ignore;
    • forged snapshots ignored; a fork fails closed, then --keep resolves it;
    • Members dev readable by a reader added after it was saved;
    • import, edit, e2e scenario 39 (PASS), and the removal checklists.
  • Round 3, this design (…/mv1-env-qa3-1327, evidence/mv1/env/r3/README.md):
    • a writer's snapshot naming production's head makes ls/get/run/export warn while values stay at the counted head;
    • run refuses PATH/NODE_OPTIONS without --allow-env-override;
    • export refuses a path a .gitignore un-ignores, and --force replaces a symlink without touching its target;
    • dg collab remove of maint2 shows "Their change: + NEW_FLAG, ~ STRIPE_KEY. Values are not shown." with the cost, then saves production again with maint2's values after the rotation.
  • Round 4, review round 2 (…/mv1-env-qa4-1454, evidence/mv1/env/r4/README.md):
    • the warning names the ignored change's author, time and id; history lists it;
    • promoting the writer (whose ignored snapshot named production's head): the prompt lists the pre-save and its cost; with --yes production is saved first and stays v1 after the role lands;
    • E608 lists both heads and points to history;
    • removing maint2 (production head, a staging conflict): two confirmations, both re-saved, saved again for; this run exposed the conflict-lineage bug, fixed and rechecked on preview (a conflict that stays one history) and ops (an environment only the removed maintainer had saved);
    • --no-resave: names the environment that changes, no second prompt, the checklist ends "Not saved again: preview.", and preview returns to the earlier version;
    • web guard: vitest transcript.
  • Round 2 (evidence/mv1/env/r2/) tested the reversed design and is historical only.

Limits and notes for the lead

  • A maintainer removed by a client that doesn't save again (an older dg; the web now refuses) leaves their environments at the version before their last change, with the warning shown. A maintainer has to look and save; nothing is used from the ignored change.
  • Each read opens every counted snapshot (one chunk each). Fine for phase 1; a cache is the obvious follow-up.
  • The members key used is the current write epoch; members environments are saved under a new key only on their next change (DESIGN §4.5 failure modes).
  • The artifact carries audience, to and v beyond DESIGN's {env, vars, generatedAt}: to renders "Who can read this" as names after posting (DFPK 0x02 has no recipient list), and audience must match the envelope.
  • Out of scope (phase 2/4): Specific people, dg env grant|revoke, the kind-9 registry, CI environment:, Settings → Environments UI.

🤖 Generated with Claude Code

PastaPastaPasta and others added 8 commits October 5, 2026 03:57
Kind-8 packManifest snapshots of one environment (mixed-visibility
design §4.5, D9, D24): canonical JSON padded to 512-byte buckets,
Members under the members key (DFPK 0x01), Maintainers to the current
maintainers (DFPK 0x02). Readers count a snapshot only when its owner
is a current maintainer, check the owner-signed packHash before opening
and take the sender key from that owner only; forks fail closed.

forge-core env::{format,codec,chain,service}, forge-web lib/env, and
20 env_snapshot__* vectors from a sibling generator
(tools/private-repos-vectors/env.py) run by both harnesses.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…story

Environments lite in dg (mixed-visibility design §4.5): maintainers-only
writes, each change one snapshot (set with several names, import and
edit included), Maintainers by default for production/prod*/staging/
release*, Members otherwise with the Members sentence. run injects the
values into the child only; export -o writes 0600, adds the file to
.git/info/exclude and verifies it with git check-ignore, and refuses a
tracked file; without -o it prints .env text for piping. A fork fails
closed naming both versions; --keep resolves it with a snapshot that
supersedes every head. dg collab remove now lists the environments and
current value names the removed member could read.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Members writes now report E312 (members-only content not turned on) and
E311 (no key shared yet) from the lane stream; dg collab remove passes
the lane's keyed flag to the removal checklist.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
docs/guides/environments.md: audiences, commands, conflicts, removal,
what is public, limits. e2e scenario 39: import, run (exit code passes
through), export -o (0600, info/exclude, git check-ignore, clean git
status), and a non-maintainer refused. dg env help and messages follow
the style guide (short imperative abouts, no semicolons or (s) plurals).
A debug-build-only DASH_FORGE_TEST_ENV_ANY_WRITER lets live QA post a
writer's snapshot that readers must ignore.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A conflict lists both versions in one cause line (an error has one
cause); a non-maintainer is told Maintainers environments go only to
maintainers; the unreadable-latest-change fix depends on the role; a
Members write in a repo without members-only content offers
--audience maintainers. dg env ls counts changes by people who are not
maintainers now, and history carries each change's packHash. A
debug-build-only DASH_FORGE_TEST_ENV_SUPERSEDES adds heads to a new
snapshot, so live QA can post a writer's snapshot naming the head.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 750c9804-aeb0-4a2b-adf5-533febd25205
📥 Commits

Reviewing files that changed from the base of the PR and between a7d6438 and 31906a2.

📒 Files selected for processing (61)
  • crates/dg/Cargo.toml
  • crates/dg/src/collab.rs
  • crates/dg/src/env.rs
  • crates/dg/src/errors.rs
  • crates/dg/src/main.rs
  • crates/dg/tests/snapshots/dg-help.txt
  • crates/forge-core/src/env/chain.rs
  • crates/forge-core/src/env/codec.rs
  • crates/forge-core/src/env/conformance.rs
  • crates/forge-core/src/env/format.rs
  • crates/forge-core/src/env/mod.rs
  • crates/forge-core/src/env/service.rs
  • crates/forge-core/src/keyring.rs
  • crates/forge-core/src/lib.rs
  • crates/forge-core/src/pack.rs
  • crates/forge-core/src/pack/manifest.rs
  • crates/forge-core/src/repo.rs
  • crates/forge-core/src/rules.rs
  • crates/forge-core/src/user_error.rs
  • docs/errors.md
  • docs/guides/environments.md
  • e2e/README.md
  • e2e/cli/run.sh
  • e2e/cli/scenarios/40-environments.sh
  • forge-contracts/vectors/env_snapshot__audience_mismatch.json
  • forge-contracts/vectors/env_snapshot__chain_cycle.json
  • forge-contracts/vectors/env_snapshot__chain_fork.json
  • forge-contracts/vectors/env_snapshot__chain_linear.json
  • forge-contracts/vectors/env_snapshot__chain_resolved.json
  • forge-contracts/vectors/env_snapshot__chain_two_roots.json
  • forge-contracts/vectors/env_snapshot__cross_environment_link_dropped.json
  • forge-contracts/vectors/env_snapshot__decode_refused.json
  • forge-contracts/vectors/env_snapshot__default_audience.json
  • forge-contracts/vectors/env_snapshot__duplicate_copy.json
  • forge-contracts/vectors/env_snapshot__hidden_environment.json
  • forge-contracts/vectors/env_snapshot__long_run_by_removed_maintainer.json
  • forge-contracts/vectors/env_snapshot__maintainers_named.json
  • forge-contracts/vectors/env_snapshot__members.json
  • forge-contracts/vectors/env_snapshot__pack_hash_mismatch.json
  • forge-contracts/vectors/env_snapshot__padding.json
  • forge-contracts/vectors/env_snapshot__post_demotion_snapshot_ignored.json
  • forge-contracts/vectors/env_snapshot__promotion_protected.json
  • forge-contracts/vectors/env_snapshot__promotion_unprotected.json
  • forge-contracts/vectors/env_snapshot__removal_checklist.json
  • forge-contracts/vectors/env_snapshot__removed_maintainer_mid_chain.json
  • forge-contracts/vectors/env_snapshot__sender_not_owner.json
  • forge-contracts/vectors/env_snapshot__unauthorized_writer_ignored.json
  • forge-contracts/vectors/env_snapshot__unreadable_head.json
  • forge-contracts/vectors/env_snapshot__window.json
  • forge-contracts/vectors/env_snapshot__writer_reuses_pack_hash.json
  • forge-web/lib/constants.ts
  • forge-web/lib/env/chain.ts
  • forge-web/lib/env/codec.ts
  • forge-web/lib/env/conformance.test.ts
  • forge-web/lib/env/env.test.ts
  • forge-web/lib/env/format.ts
  • forge-web/lib/env/index.ts
  • forge-web/lib/repo/environments-guard.test.ts
  • forge-web/lib/repo/writes.ts
  • forge-web/lib/rules/conformance.test.ts
  • tools/private-repos-vectors/env.py
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 15 commits October 5, 2026 05:17
Lead decision: an environment never falls back silently to older values
(they may hold a rotated credential). Consensus cannot tell a removed
maintainer's kind-8 snapshot from a writer's (both r 1; the maintainer
document is deleted), so readers use evidence that its owner was a
maintainer: they own a config or repoKey document (maintainer-only,
undeletable), or a current maintainer's snapshot lists them in its new
`maintainers` field. Such a snapshot joins the chain unopened; as an
environment's newest it makes the environment stale: run/get/export
refuse it (E609), ls says it needs saving again, and `dg env resave`
shows who saved it and when, then saves the same values as the current
maintainer. A writer's snapshot without evidence stays ignored.

dg collab remove of a maintainer now saves again, after the rotation,
every environment whose latest change they made (one snapshot each,
cost in the prompt), before printing the checklist; it reads them with
the removed maintainer as known former maintainer.

Snapshots record the maintainers when saved (sorted; the writer must be
listed). Environment conflicts get their own code (E608). Vectors:
head_by_removed_maintainer, removed_maintainer_mid_chain (was
removed_maintainer_skipped), former_maintainers; unauthorized_writer_ignored
kept.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… with the last readable version

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	crates/forge-core/src/keyring.rs
… block

Lead review of #397 (the former-maintainer evidence, E609 and dg env
resave were gameable by a demoted maintainer or any writer reusing a
packHash), reversed for a rule writers cannot game:

- only a current maintainer's snapshot counts; no other manifest's
  values or links are used. Links count only between counted snapshots
  and strictly back in block height; order is by block height. The
  snapshot `maintainers` field, the former-maintainer evidence, E609 and
  dg env resave are gone.
- writers name every counted snapshot of the environment (newest first,
  up to 32) in supersedes, so removing a maintainer who wrote a change
  in the middle of a chain splits nothing.
- an ignored manifest naming an environment's head from a higher block
  is reported (ignoredNewer): ls, get, run and export print one warning
  line and keep using the counted head.
- dg collab remove of a maintainer pins each environment head they
  wrote, shows its per-entry diff against the previous version by
  someone else (values hidden) with the cost, and after the rotation
  saves it again only if the pinned head is still there and nothing
  newer was counted. The checklist notes environments the remover
  cannot read.
- export -o adds the exclude entry and checks git check-ignore before
  writing, refuses a path git would not ignore, and --force replaces a
  symlink instead of following it; .env output is quoted so sourcing it
  runs nothing; run refuses PATH, LD_PRELOAD, LD_LIBRARY_PATH, DYLD_*,
  BASH_ENV, ENV, NODE_OPTIONS without --allow-env-override; edit keeps
  Ctrl-C for the editor and removes its file on hangup or termination.
- test hooks are compiled only into debug builds; env.py matches names
  with fullmatch. Vectors: writer_reuses_pack_hash,
  post_demotion_snapshot_ignored, self-links and same-block links in
  chain_cycle, and decode cases for a duplicate key, uppercase \u, raw
  U+2028 and astral characters, -0 and 1e3.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	forge-web/lib/rules/conformance.test.ts
…anges, conflict copy, run and export guards

- Promotion: before granting maintainer, dg collab add dry-runs the resolution with the
  new member counted and first saves the current values of every environment their
  dormant snapshots would change, naming those snapshots as replaced
- Removal: the dry run without the member drives the re-save, including environments in
  conflict where they wrote a head; --no-resave and a separate confirmation for the saves;
  history shows saved again for <member>
- supersedes window: current heads, each author's newest, then the newest (max 32);
  savedFor field in the snapshot format; vectors for the window, a long run by a removed
  maintainer and promotion
- E608 lists every head with author and time and points to dg env history; a split has its
  own wording; resolving needs more than one head; a no-op change saves nothing
- run refuses entries shadowing a parent variable or changing program start-up without
  --allow-env-override; export fails closed when git can't run in a work tree, uses literal
  pathspecs for ls-files and refuses a case-only collision with a tracked file
- editor exit restores Ctrl-C/Ctrl-\ handling; ignored-change warnings name author, time
  and id, and history lists ignored changes; fetch failures report E503
- web refuses removing, demoting or making a maintainer of a repo with environments
- Members snapshots follow the late-content rule; removal does not count conflicted
  environments as unreadable

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…with its shared history

The re-save named only the removed maintainer's own (now ignored) snapshot and
predicted heads it had named, so it started a separate history (seen live on sakura:
staging read as 2 separate histories). It now also names the snapshots that still
count which that version descends from.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PastaPastaPasta and others added 4 commits October 5, 2026 13:29
# Conflicts:
#	crates/forge-core/src/pack.rs
#	crates/forge-core/src/pack/manifest.rs
#	e2e/cli/run.sh
- forge-core: Book::manifest is public (manifest_of removed) and Book::window_over replaces dg's copy of the SnapshotRef mapping; Book::base builds its Base in one place; one chain_order key for the manifest sorts; seal drops a sort/dedup recipients() already does; chain::window partitions once with one comparator.
- dg: one environments(session) constructor; fold_case shared by the env-override guard; count() for entry plurals; one history arm for readable changes; unused member parameters dropped from explain_pins, Removal::explain and finish_removal; Default for empty Removal/Promotion plans; set reuses its early maintainer check instead of repeating it before the read.
- conformance harness, TS and Python: shared helpers, no unused parameters, no nested ternaries, no pass-through open_case. Vectors regenerate byte for byte.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit cf9d926 into master Oct 5, 2026
34 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/mv1-env branch October 5, 2026 20:38
PastaPastaPasta added a commit that referenced this pull request Oct 7, 2026
Resolve docs/errors.md and docs/guides/collaborating.md in master's new
structure (#407 "What to do" entries, #404 "say who enforces a rule"):
E306, E311, E312 and E313 keep this PR's content under "What to do",
E311 leads with "You're a member, but no key has been shared with you
yet" and points at Repair or `dg repo keys repair`. #397 is merged, so
the PENDING #397 markers go; PENDING #400 and 1D notes stay.
audiences.md's error entries use "What to do" and name Forge apps
rather than clients.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PastaPastaPasta added a commit that referenced this pull request Oct 7, 2026
…ue shown, stored-bytes hash

- addPrivateMember/removePrivateMember refuse a maintainer change in a repo with environments first, before the consent check and any paid re-anchor (private repos had no guard since #397)
- values hide synchronously on pagehide/visibilitychange; showing a value hides any other
- removal checklist says a member who stays a maintainer keeps access instead of asking to rotate
- stored artifact loads hash a single copy's Platform chunks against packHash and stay out of the content-check ledger
- environment maintainers come from maintainer documents only
- no unlock prompt for outsiders

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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