Skip to content

Audit sweep: 30 verified fixes across client, server, daemon, orchestrator, growth, seed, MCP#24

Merged
Ghost-Frame merged 10 commits into
mainfrom
fix/audit-sweep
Jul 12, 2026
Merged

Audit sweep: 30 verified fixes across client, server, daemon, orchestrator, growth, seed, MCP#24
Ghost-Frame merged 10 commits into
mainfrom
fix/audit-sweep

Conversation

@Ghost-Frame

@Ghost-Frame Ghost-Frame commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the FrameShift half of the two-repo audit sweep: every adversarially verified finding from the full-workspace audit, fixed in eight logical commits.

  • client/conformance: default registry URL now points at the -api host that actually serves the API; explicit persona activation records to the local selection history and opt-in telemetry; new warn-only cross-version conformance gate (typed CrossVersionDecision) evaluated on install-over-existing, surfaced through InstallReport and a CLI warning. Installs are never blocked.
  • daemon: the shutdown RPC now actually stops the accept loop (the watch sender was created and discarded); end-to-end socket test proves it.
  • orchestrator: anti-pattern/general-pattern text joins the keyword corpus; high-signal section weighting is no longer inert.
  • growth: the orphaned JSONL layer is wired in -- dual-write in append(), a migrate pass, and grow log / grow summary subcommands.
  • seed: pack.toml-only persona directories seed end to end; placeholder author_pubkey values are repaired via a surgical single-line rewrite that preserves the hand-written manifest byte-for-byte otherwise.
  • mcp: new frameshift_search tool for registry-search parity with the CLI.
  • server: /healthz no longer leaks backend internals to the unauthenticated boundary; publish errors no longer leak tempdir paths; GET /v1/authors added; versions route paginated; downloads rustdoc matches real status codes.
  • docs: README config table covers all 27 server vars; CI MSRV comment and preflight docs corrected.

Verification

  • cargo fmt --all: clean
  • cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test --workspace: 67 test binaries, 0 failures

…onformance gate

Points DEFAULT_REGISTRY_URL at the -api host that actually serves the
registry API. Wires the CLI's explicit persona activation into the
existing local selection-history log and the opt-in-gated telemetry
sender, matching the activation contract shared by every client
surface; both calls are best-effort and never fail the command.

Adds RegressionGate::evaluate_cross_version with a typed
CrossVersionDecision (Pass, Regression, IntegrityFailure,
MissingBaseline, InvalidScore), leaving evaluate_upgrade untouched.
Client::install evaluates it before overwriting an installed persona
and records the outcome on InstallReport as an additive optional
field; the CLI prints a warning for non-clean outcomes. All outcomes
are warn-only -- installs are never blocked.

Also corrects selection.rs and lib.rs docs that claimed the history
log feeds intelligent selection; that learning lives in the
orchestrator's preferences store.
The watch channel's sender was created and immediately discarded, so
the shutdown method returned its canned reply and closed that one
connection while the accept loop ran forever. The sender is now
threaded into serve() and cloned into each connection; a shutdown RPC
flips the flag and the accept loop exits. Covered by an end-to-end
socket test.
PersonaProfile::from_source dropped anti-pattern and general-pattern
text from the keyword corpus entirely. High-signal section extraction
ignored heading levels and its output was deduplicated away against
the prepended full body, making the weighting inert; signal sections
now lead the corpus so extraction order matters.
The structured JSONL growth layer existed with zero callers. append()
now dual-writes: markdown first (unchanged behavior), then a
best-effort structured entry; a JSONL failure after a successful
markdown write propagates as the call's error. frameshift migrate
gains a growth-log pass (idempotent per persona), and grow log /
grow summary expose the structured history. The silent chmod failure
on the growth file now logs.
The persona gate required persona.toml or AGENTS.md, skipping every
curated pack.toml-only directory; pack.toml is now a sufficient
marker. Curated manifests ship a placeholder author_pubkey that the
strict parser rejects, so the seeder repairs it in place with the real
signing key via a surgical single-line rewrite that preserves
comments, key order, and every other byte of the hand-written file.
Marketplace metadata now comes from pack.toml description/tags first,
with the legacy persona.toml/AGENTS.md derivation as fallback.
The stdio MCP server had no registry-search parity with the CLI's
search command. Adds a frameshift_search tool (query required, limit
optional with a default of 20 and a client-side cap of 100) backed by
Client::search_registry.
…te versions

/healthz previously passed backend detail strings (filesystem roots,
pool counts, raw driver errors) verbatim to an unauthenticated
endpoint; detail is now a fixed ok/degraded string and the rich detail
goes to server-side tracing only. Publish validation errors no longer
leak tempdir paths. GET /v1/authors exposes the already-implemented
catalog listing with limit/offset, the versions route gains the same
pagination (default 100), and the downloads rustdoc now matches the
status codes the handlers actually return.
Documents all 27 server config vars from config.rs, adds a Downloads
subsection explaining direct vs signed delivery, corrects the MSRV
noted in the CI workflow comment to the declared rust-version 1.86,
and drops preflight's reference to a mirror job that no longer
exists.
A shipped baseline whose declared bundle hash does not match the
bundle the pack actually ships means the conformance evidence cannot
be trusted -- unlike a score regression, this indicates tampering or a
broken publish pipeline, so the install-over-existing now fails with
ConformanceIntegrityFailure instead of warning. The previously
installed version is left untouched. Operators can consciously
proceed with FRAMESHIFT_ALLOW_CONFORMANCE_INTEGRITY_FAILURE=1, in
which case the CLI warning names the override. Regression,
MissingBaseline, and InvalidScore stay warn-only.

Also fills in missing doc comments across the client library surface.
POST /v1/admin/packs/{name}/{version}/tombstone exposes the
previously-unwired catalog tombstone (one-way Active -> Tombstone,
idempotent per the Postgres adapter). Auth reuses the Ed25519
signed-request middleware plus a new FRAMESHIFT_ADMIN_PUBKEYS
allowlist (comma-separated base64url keys); an empty allowlist
disables the endpoint entirely and answers 404 so its existence is
not revealed, a verified non-admin signer gets a generic 403. Body
carries the tombstone reason (author-request, tos-violation, dmca).
Covered by six integration tests through the real router.
@Ghost-Frame
Ghost-Frame merged commit ee0214b into main Jul 12, 2026
5 checks passed
@Ghost-Frame
Ghost-Frame deleted the fix/audit-sweep branch July 12, 2026 14:34
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