Skip to content

feat(whitepaper): living whitepaper evidence sync, anti-hallucination verify & SHA-256 ledger sealing - #18

Open
onimurasame wants to merge 1 commit into
masterfrom
feat/living-whitepaper-sync
Open

onimurasame wants to merge 1 commit into
masterfrom
feat/living-whitepaper-sync

Conversation

@onimurasame

Copy link
Copy Markdown
Collaborator

Summary

Ports a general-purpose, zero-new-dependency living-whitepaper evidence synchronization and cryptographic SHA-256 proof ledger engine into Number One:

  • Core Engine (\src/core/whitepaper.ts): Zod-validated .numberone/whitepaper.json\ schema supporting declarative \ emplate,
    eceipt_table, and \sor_summary\ living blocks, safe \computed\ arithmetic (\sum/\sub/\mul/\div/\count), formatting filters (\commas, \ ixed, \mib, \kib, \sha, \default), declarative anti-hallucination \claims, and deterministic \path:bytes:sha256\ ledger manifest sealing (
    1-ledger-v1\ / \�ux-ledger-v1).
  • Governance Fixed-Point Invariant: \sor_summary\ watermarks exclude \whitepaper.synced\ / \whitepaper.verified\ events so \sync -> verify\ is strictly idempotent while any new ADR, directive, lesson, or execution event immediately flags drift.
  • Security Hardening: Enforces CWE-22/CWE-59 path & symlink/junction confinement, prototype-pollution guards (\isSafeRecordKey), single-pass anti-SSTI interpolation, duplicate-marker rejection, and bounded reads/atomic writes.
  • CLI & MCP Integration: Adds
    1 whitepaper <init|sync|verify>, stream event types \whitepaper.synced\ / \whitepaper.verified, MCP tools \init_whitepaper\ / \sync_whitepaper\ / \�erify_whitepaper, and MCP resource
    umberone://whitepaper-status.

Verification


  • pm run typecheck\ &
    pm run build: PASS (0 errors)

  • px vitest run tests/whitepaper.test.ts: 5/5 PASS (fixed-point idempotency, 1-digit whitepaper mutation, 1-byte sealed proof tamper, CWE-22/CWE-59/SSTI/proto-pollution security suite, real CLI exit codes 0 vs 2, real MCP stdio JSON-RPC 2.0)

  • px vitest run tests/workflow-and-pr-automation.test.ts -t 'Bridge Crew Self-Audit': 100/100 KPI across Engineering, Security, and Bridge officers

  • pm run verify:workflows: PASS (6 workflows, 21 action pins)
  • Dual cross-language parity verified live on \VectorUXFramework\ (39 sealed files, identical 64-char SHA-256 ledger root across TypeScript
    1\ and Rust \�ux).

Comment thread src/core/whitepaper.ts
}

function escapeTableCell(raw: string, maxLen = 280): string {
const cleaned = raw.replace(/\|/g, '\\|').replace(/\r?\n/g, ' ').replace(/\s+/g, ' ').trim();

This branch has not been deployed

No deployments
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.

2 participants