Skip to content

graft: recover orphan branch rescue/orphan-74905f7ed152-feat-den-1417-add-canonical-nix-interop onto main - #4

Merged
ORESoftware merged 84 commits into
mainfrom
graft/rescue-orphan-74905f7ed152-feat-den-1417-add-canonical-nix-interop-20260905
Sep 12, 2026
Merged

ORESoftware merged 84 commits into
mainfrom
graft/rescue-orphan-74905f7ed152-feat-den-1417-add-canonical-nix-interop-20260905

Conversation

@ORESoftware

Copy link
Copy Markdown
Contributor

Draft. rescue/orphan-74905f7ed152-feat-den-1417-add-canonical-nix-interop was rescued from a dangling commit, so it has no common history with main and GitHub would not open a pull request for it.

This branch is a genuine two-parent merge of origin/main and 74905f7ed1521de90a32befd5e6a835243333909, built with git merge-tree/commit-tree plumbing — no checkout, no working-tree change anywhere.

How the overlap was resolved (both sides carried these files; there is no common ancestor to diff against):

  • .gitignore — union (2 extra rule(s) carried over)
  • kept main's current version: README.md

Those are scaffolding files that main has regenerated since the orphan was written; the orphan's own copies are not lost — read them with git show 74905f7ed1521de90a32befd5e6a835243333909:<path>. Everything else the orphan adds (53 file(s)) is here verbatim.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KAAGBnXTSw7zE5xnY4tiBY

ORESoftware and others added 30 commits July 23, 2026 14:22
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- zed-interfaces: VersionScheme (semver/calver/opaque), tolerant version parsing
  (v-prefix, Go +incompatible, PEP 440), npm-style range parsing, shared sync
  contract types (SyncWriteMode/ErrorPolicy/ChangeEvent), regenerated schemas.
- zed-cli: resolve via the shared calver-aware resolver; deterministic zip
  artifacts alongside tar.gz with magic-byte extraction.
- zed-api-server: persist and serve version_scheme (entity + migration + handlers).
- zed-clients: dependency-free sync wire types bridge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rl validation

- PackageSection gains bin, build ([build] command+outputs), build_dependencies,
  workspace ([workspace] members), and overrides.build sections for the polyglot
  build-cache, binary-hoisting, monorepo, and consumer-patch features.
- Validate repository URL scheme, bin names/targets, and build outputs; reject
  range-shaped requirements that don't parse (no silent degrade to opaque tag).
- Add is_sha256_hex + is_safe_relative_path guards for the CLI trust boundary.
- Add build_entry_rel/current_platform (per-platform build cache) and BIN_DIR.
- Yank REST DTOs (YankRequest/YankResponse) + yank_path helper.
- Regenerate JSON schemas; fix stale zed.toml/zed.lock doc references.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The generated schemas/ are the contract the non-Rust SDKs mirror; verify they
stay in sync with the source types on every push.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds an [install] section with a `dir` (default `zed_modules`; e.g. `.vendor/.zed`
or `.deps/.zed`) plus an optional `adapter`, and a Manifest::modules_dir() helper.
The dir must be a safe relative path (InvalidInstallDir otherwise). This lets zed
COMPLEMENT npm/maven rather than replace them: the few zed-sourced deps land in a
project-relative tree the ecosystem adapter then wires into the toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The InstallSection addition (install.dir / install.adapter) landed in the
Rust types but the committed JSON schemas were never regenerated, so the
"Schemas are up to date" CI gate failed. Regenerated via
`cargo run --example generate_schemas`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The shared contract for the org audit trail (zed-docs issue #7), so the
server, CLI, and generated client schemas cannot disagree on it.

`AuditEntry` carries the raw `action` string alongside a parsed
`action_kind`, and `AuditAction::parse` returns Option: an unrecognized
action from a newer server deserializes cleanly on an older client
instead of failing the whole response.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…language

A client repo (fiducia-clients, zed-clients, …) ships the same library for
several ecosystems. Installing all of them into every consumer is wrong: a
Java build should never download the Node sources.

[targets.<lang>] declares one language subtree per ecosystem:

    [targets.nodejs] dir = "clients/ts"    adapter = "node"
    [targets.java]   dir = "clients/java"  adapter = "java"
    [targets.golang] dir = "clients/go"

Each target is its own PUBLISHED package, named <name>-<target> by default
(overridable per target), so one repo and one version fan out to
fiducia/fiducia-clients-{nodejs,java,golang}@1.1.2 — a consumer depends on
the one it needs and downloads only those bytes.

manifest_for_target() derives the standalone manifest that ships inside each
artifact: same org/version/repo, the target's own name and adapter, and no
[targets] (a slice is single-language by construction, so fan-out cannot
recurse). [install].target + target_subdir() cover the consumer side for
path/workspace deps that point at the polyglot root.

Target names and dirs are validated (slug names, no absolute/.. dirs).
Packages without [targets] are entirely unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The schema-drift gate caught it: [targets] landed in the manifest without
regenerating schemas/, which the non-Rust SDKs codegen from.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…Search*, EmbeddingUpsertRequest); regen schemas

Companion to zed-api-server's package_embedding (pgvector 2050) + tags work.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Support whole-repository targets safely by excluding generated pack output and covering the boundary in tests.
ORESoftware and others added 27 commits July 30, 2026 18:57
The draft is a competing earlier design for the feature main already
ships. It put format / registries / registry_urls (keyed by a
PublishRegistry enum) on the publish section; main routes through
native: Option<NativeReleaseSection> and per-target
[targets.*.native], which is what schemas/manifest.json,
tests/native_release.rs, and the merged zed-cli side are written
against.

Adopting the draft's fields would leave two conflicting
representations of publish routing in one struct and break the
round-trip tests. Kept main's schema. The branch is recorded as
merged so its history is contained in main, but the superseded
design is not resurrected.
The multi-registry schema draft merge resolved its conflicting hunks
to main, but the draft's non-conflicting hunks auto-merged and still
referenced the design main replaced: a validate_publish_route block
reading publish.format / publish.registries / publish.registry_urls
and the same fields on TargetSection. None of those exist on main's
route model, so the crate did not compile (11 errors).

Removes that validation block and the now-unreferenced
publish::PublishRegistry module it was the only consumer of. Routing
is validated by the native/[targets.*.native] path that main already
has. cargo check is clean and all 42 tests pass.
Merge DEN-132 contract-specific instructions, minimal tool pointers, and the pinned shared policy gate after successful interface CI and policy validation.
Preserve the public Zed interface contract while adding a locked Nix shell, deterministic schema drift checks, pinned read-only workflows, strict current-stable Clippy, and a documented compatibility boundary for the older Nixpkgs Clippy style lint.

Exact reviewed head: ff428c1
Refs DEN-359 and DEN-1354.
The audit log records who changed published state, but nothing made it
tamper-evident: anyone with database access could delete or edit a row
silently, which defeats a forensic trail. This adds the contract half of a
hash chain, plus the query surface the log needs to be usable at scale.

- AuditEntry gains seq/entry_hash/prev_hash. All are #[serde(default)] and
  the empties are skipped, so a body from a pre-chain server still
  deserializes and the serialized shape is unchanged when unset.
- audit_chain_preimage() defines the exact bytes hashed, here in the shared
  contract rather than in the server, so a client can verify the chain
  itself. A tamper-evident log whose only checker is the party able to
  tamper is not much of a guarantee.
- Every field is length-prefixed. A separator-joined encoding is forgeable:
  a token named `x|publish` could shift field boundaries and reproduce a
  different entry's digest. A test asserts distinct entries cannot collide
  and that each field participates.
- The input is a named-field struct, not ten positional &str: transposing
  subject and actor_token_name would otherwise compile silently and change
  every digest.
- audit_verify_path() + AuditIntegrityResponse report intactness, the first
  bad seq, the failure kind, and a head hash an operator can anchor
  externally so tail truncation is also detectable.
- Both audit responses now generate JSON schemas like every other
  client-facing DTO; they had been missed.

nix develop -c agent-check passes (fmt, clippy -D warnings, tests,
doctests, schema generation, drift check).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Land the service-independent Nix interoperability contract defined by the merged RFC.

Includes explicit systems/outputs, immutable Zed and Nix origin evidence, NAR and artifact identities, strict policy evidence, closure-free v1 imports, canonical JSON, fail-closed versioning, and public contract tests.

Manifest/lock embedding and generated adapter schemas remain staged under DEN-1417.
…nical-nix-interop into main (graft, scaffolding reconciled)

`rescue/orphan-74905f7ed152-feat-den-1417-add-canonical-nix-interop` was recovered from a dangling commit and shares no history with `main`. This is a real two-parent merge
built with plumbing (no checkout). Every path the orphan adds is taken verbatim (53 file(s)). The overlap was
scaffolding only:
  .gitignore: union (2 extra rule(s) carried over)
  kept main's current version: README.md 
The orphan's own copies remain readable at `git show 74905f7:<path>`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KAAGBnXTSw7zE5xnY4tiBY
@linear-code

linear-code Bot commented Sep 6, 2026

Copy link
Copy Markdown

DEN-1417

@ORESoftware
ORESoftware merged commit 8b7a0f5 into main Sep 12, 2026
5 checks passed
@ORESoftware
ORESoftware deleted the graft/rescue-orphan-74905f7ed152-feat-den-1417-add-canonical-nix-interop-20260905 branch September 12, 2026 16:56
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