Files
Keysat 2e70b34592 Architect grounding boundary: redaction/re-hydration privacy gate (v0.1.0:55)
Phase 1 Workstream D. Lets the Architect ground the thesis in REAL recurring LP
objections without any LP identity reaching the Claude API. Layered, defense-in-depth,
fail-closed by construction (docs/redaction-rehydration.md).

backend/redaction/:
- scrub.py: the leak-proof core. Drops Tier-1 (labelled/structured account/wire/SSN/
  IBAN/SWIFT/passport, separator-tolerant); tokenizes known LP entities (dictionary from
  the canonical layer, unicode-folded + hyphen-extended) and structured PII (emails,
  scheme-less/social URLs, intl+ext phones, currency-cued amounts, ISO/worded/numeric/
  quarter dates, addresses, bare long digit runs); pre-neutralizes injected [TYPE_N]
  strings; single-pass rehydrate; metadata-only audit logging (the pseudonym map is the
  de-anon key — local-only, never logged/sent). Hardened across THREE adversarial
  leak-hunts (worded/coded amounts, intl phones, NFD/ligature/zero-width names, slash/
  comma SSN, SWIFT, alpha-prefixed accounts, substance-preserving false-positive fixes).
- client.py: Boundary — one scrub/rehydrate contract, SCRUB_BACKEND=local (default) or
  gateway (Spark Control /scrub + /rehydrate). Fails closed (db_path required; dictionary
  build errors propagate; strict rehydrate returns tokenized-not-de-anon text).
- test_scrub_leak.py, test_reidentification.py: golden-file leak + re-identification
  suites (synthetic only, guardrail #9), regression-locking every leak-hunt vector.

backend/mcp/architect_grounding.py: the flow — retrieve (local) -> minimize-first
(local Qwen) -> scrub (+ local-Qwen NER backstop for unknown names) -> Claude over the
de-identified register only -> re-hydrate locally -> human review. FAILS CLOSED if the
local model is unreachable or a hallucinated token appears. test_grounding_boundary.py
proves nothing sensitive reaches Claude and the three fail-closed paths.

server.py: POST /api/architect/ground (admin) wires retrieval -> ground_objections.
docker_entrypoint.sh: SCRUB_BACKEND (default local). docs/spark-control-scrub-endpoints.md:
the gateway handover spec (Option 1 — caller supplies the entity dictionary).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 17:06:29 -05:00

23 lines
1.3 KiB
TypeScript

import { VersionInfo } from '@start9labs/start-sdk'
// The Architect grounding boundary (Phase 1 Workstream D): the redaction / re-hydration
// privacy gate so the Architect can ground its thesis in REAL LP feedback without sending
// any LP identity to Claude. A local-Qwen summary minimizes first, a deterministic scrubber
// (hardened across three adversarial leak-hunts) tokenizes residual identifiers, a local-Qwen
// NER pass backstops unknown names, Claude reasons only over the de-identified register, and
// the draft is re-hydrated locally for human review. Fails CLOSED if the local model is
// unreachable. SCRUB_BACKEND=local (default) or gateway (Spark Control /scrub + /rehydrate,
// once built). No data migration.
export const v_0_1_0_55 = VersionInfo.of({
version: '0.1.0:55',
releaseNotes: {
en_US: [
'Adds the Architect grounding boundary: the Architect can now pressure-test the thesis',
'against real recurring LP objections WITHOUT any LP name, email, amount, or other',
'identifier reaching Claude — everything is de-identified locally first and the draft is',
'restored on the server for your review. Sovereignty by construction; fails closed.',
].join(' '),
},
migrations: { up: async () => {}, down: async () => {} },
})