chore(memory): R4.10 contract FILE SCOPE declares itself, memory files and redactions; criteria 9-12 added, none removed; local paths redacted in older contracts
This commit is contained in:
1 parent
634c744ecf
commit
cd0630b0a7
9 files changed
+35
-22
No files matched your search
@@ -20,7 +20,7 @@ Freeze the current PDF pipeline behaviour before any refactor: new fixtures, gol
|
||||
CHECK: cd apps/app && corepack pnpm vitest run tests/unit/routes.HomeRoute.import.test.tsx tests/unit/routes.EditorRoute.export.test.tsx 2>&1 | tail -3
|
||||
EXPECT: Tests .* passed
|
||||
5. Whole app suite, typecheck and lint green; no file under apps/app/src changed.
|
||||
CHECK: cd apps/app && corepack pnpm typecheck && corepack pnpm lint && corepack pnpm test:run 2>&1 | tail -4; git -C /home/bchanot/Documents/faunosteo status --short apps/app/src | wc -l
|
||||
CHECK: cd apps/app && corepack pnpm typecheck && corepack pnpm lint && corepack pnpm test:run 2>&1 | tail -4; git -C $HOME/Documents/faunosteo status --short apps/app/src | wc -l
|
||||
EXPECT: Tests .* passed ; 0
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
@@ -19,7 +19,7 @@ Give the domain package the archive contracts (sheet snapshot, envelope v1, bran
|
||||
6. `packages/domain/src/report/rebase.ts`: `rebaseReportOnSheet(report, index, archived)` as spec §13; tests: same sha → untouched, `rebased false`; different sha → unknown annotation → `unresolved: true` + labels from the archived snapshot's annotation name (both locales) when the zone had none; unknown viewId → unresolved; finding with no node → unresolved; already-unresolved items stay; resolved items untouched; `report.sheet` replaced by `index.sheet.ref`; output passes `ReportSchema`.
|
||||
7. Bundle: `apps/app/vite/sheet-bundle.ts` payload gains `assetHashes` (from `assets.json` `sha256` by `svg_asset_id`); `apps/app/src/sheets/provider.ts` `BundledSheetData`/`LoadedSheet` gain `assetHashes: Readonly<Record<string, string>>` and `schemaVersion: number` (from `ref.schema_version`); `parseBundledSheet` fills them; `tests/unit/sheets.provider.test.ts` asserts the hash of the horse asset equals the manifest value.
|
||||
8. Green everywhere: `corepack pnpm -r typecheck && corepack pnpm -r lint && corepack pnpm -r test:run` from the repo root (domain, anatomy, supabase, app). The Phase 0 golden tests and route characterisation tests under apps/app/tests must pass unchanged.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo && corepack pnpm typecheck 2>&1 | tail -2 && corepack pnpm test:run 2>&1 | grep -E "Tests|Test Files" | tail -8
|
||||
CHECK: cd $HOME/Documents/faunosteo && corepack pnpm typecheck 2>&1 | tail -2 && corepack pnpm test:run 2>&1 | grep -E "Tests|Test Files" | tail -8
|
||||
EXPECT: all passed
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
@@ -18,7 +18,7 @@ Promote the Node-side view composer of the curation pipeline (`packages/anatomy/
|
||||
EXPECT: Tests .* passed
|
||||
4. Tests (xmldom, draft document + draft horse.svg): main view with two selected annotations (one point → both hitbox and twin highlighted, one spine zone), head view (no halo), nothing selected (layer empty), unknown view throws, idempotent halo (no duplicate filter when called on a root that already has one), highlight keeps `<title>`, zero `data-` attributes in the serialised output, review-mode output byte-identical to the previous `renderAppReviewDrawing` for both views.
|
||||
5. `pnpm typecheck && pnpm lint && pnpm test:run` green in packages/anatomy; no other package changed.
|
||||
CHECK: git -C /home/bchanot/Documents/faunosteo status --short | grep -v "^?? packages/anatomy\|^ M packages/anatomy" | grep -v ".claude/" | wc -l
|
||||
CHECK: git -C $HOME/Documents/faunosteo status --short | grep -v "^?? packages/anatomy\|^ M packages/anatomy" | grep -v ".claude/" | wc -l
|
||||
EXPECT: 0
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
@@ -22,7 +22,7 @@ Create `packages/pdf` (`@faunosteo/pdf`): the browser-free PDF engine that expor
|
||||
9. Raster (`tests/raster.test.ts`, T10, resvg): a real `Rasterizer` built on `@resvg/resvg-js` (`fitTo width`) renders the demo report's main and head highlighted views: PNG width = 1200, height = requested ±1, pixels within ±24 of `#b85a3f` present, non-white ratio in [0.01, 0.9]; a rasterizer that throws yields a PDF whose page has no image and one `view_raster_failed` warning.
|
||||
10. Size (T7): demo envelope attachment stored bytes (the EmbeddedFile stream `contents.length` found through `enumerateIndirectObjects`) < 250,000; the test prints stored and raw sizes for `nologos` and `logos` brandings.
|
||||
11. Everything green: `corepack pnpm typecheck && corepack pnpm lint && corepack pnpm test:run` in packages/pdf, and `corepack pnpm -r typecheck` at the root; `apps/app/src` untouched.
|
||||
CHECK: git -C /home/bchanot/Documents/faunosteo status --short apps/app/src | wc -l
|
||||
CHECK: git -C $HOME/Documents/faunosteo status --short apps/app/src | wc -l
|
||||
EXPECT: 0
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
@@ -17,7 +17,7 @@ Wire the application onto `@faunosteo/pdf`: export through the engine with a sna
|
||||
6. New tests: `pdf.export.app.test.ts` (T2: export the demo fixture through `exportReportToPdf` with the real bundled sheet, then mutate a cloned LoadedSheet's labels and one geometry, re-export the ENVELOPE through `exportFromEnvelope` and assert the engine output facts equal the first export, not the mutated sheet; T13 call shape covered by Phase 0), `pdf.goldens.test.ts` adapted so the app export path reproduces the Phase 0 goldens through the engine (same spies; the `rasterizeSvg` mock becomes a mock of `@/pdf/browserRasterizer`), `routes.HomeRoute.archive.test.tsx` (T15: envelope import with same sha → archive kept in store, archive_ok alert; envelope whose sha differs → rebased alert with count, unresolved flags, labels filled, `report.sheet` updated; snapshot rejected outcome → snapshot_rejected alert with the reason label; `attachment_stripped` → its error message), `migration.leaves.test.ts` kept green (612 leaves through the new path).
|
||||
7. Bundle cost: `SHEET_BUNDLE=draft corepack pnpm build` in apps/app succeeds; report the gzip size of the main JS chunk before (from `git stash`-free method: build develop in a worktree is NOT allowed; instead read the size printed by vite for the chunk containing xmldom and report the total gz of dist/assets/*.js) and the size of the xmldom portion if vite's output isolates it; ceiling 50 KB gz for xmldom's share, else report.
|
||||
8. Green: from the repo root `corepack pnpm typecheck && corepack pnpm lint && corepack pnpm test:run && corepack pnpm build`; `grep -rn "fetch(" apps/app/src/pdf` shows only `branding.ts`.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo && corepack pnpm test:run 2>&1 | grep -E "Test Files|Tests " | tail -8
|
||||
CHECK: cd $HOME/Documents/faunosteo && corepack pnpm test:run 2>&1 | grep -E "Test Files|Tests " | tail -8
|
||||
EXPECT: all passed
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- date: 2026-10-13 | flow: ad-hoc correction (owner brief 2026-10-13, after R0 delivery) | branch: feature/rust-r0-foundation (R0 closed at bd9c7d1; this delta on top)
|
||||
- status: closed 2026-10-13 — pass 2 CONFORME 11/11, security pass 2 PASS; post-pass fix 496f549 (fail-closed drift step) verified by execution (oracles 6, 9, 10 amended before dispatch after a dry run by the orchestrator; pass 1: verifier ECARTS(2) = two floor STUB hits on doc prose "(not implemented)" → reworded; security PASS with 1 MEDIUM + 6 LOW → fixes: warn-only advisories stage and porcelain drift gate in check-all.sh and ci.yml, PATH guard appends an absolute dir only, literal rm path, prctl unused arguments as unsigned long with an honest comment; evidence of pass 2 = check-all-2.log)
|
||||
- spec: owner brief (REQUEST below), docs/development/RUST.md §1 and §4 (what the correction builds), docs/development/RUST_ARCHITECTURE_REVIEW.md Annex C.1
|
||||
- evidence logs (runs made by the orchestrator on this host, readable): /tmp/claude-1000/-home-bchanot-Documents-faunosteo/71caaac9-9523-489e-bc17-e28e1d4fd532/scratchpad/{toolchain-install.log,warm-build.log,native-check.log,native-check-2.log,docker-alt.log,check-all.log,check-all-2.log}
|
||||
- evidence logs (runs made by the orchestrator on this host, readable): <session scratchpad>/{toolchain-install.log,warm-build.log,native-check.log,native-check-2.log,docker-alt.log,check-all.log,check-all-2.log}
|
||||
- the verifier never installs, uninstalls or updates anything on the host; cargo commands below run the native toolchain already installed (rustup in ~/.cargo); `~/.cargo/bin` may be absent from a non-interactive PATH: prefix commands with `PATH="$HOME/.cargo/bin:$PATH"` when `cargo` is not found. Docker commands are not re-run (read check-all.log).
|
||||
|
||||
## REQUEST (owner brief 2026-10-13, condensed — IMMUTABLE)
|
||||
@@ -10,7 +10,7 @@ Development machine = self-hosted Ubuntu server (native, not WSL, not the VPS) w
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. Native toolchain pinned and complete, user-level only.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo && "$HOME/.cargo/bin/rustup" show active-toolchain | cut -d' ' -f1; "$HOME/.cargo/bin/rustup" component list --installed --toolchain 1.99.0 | grep -c "rustfmt\|clippy"; "$HOME/.cargo/bin/rustup" target list --installed --toolchain 1.99.0 | grep -c "^wasm32-unknown-unknown$"; "$HOME/.cargo/bin/wasm-bindgen" --version; "$HOME/.cargo/bin/cargo-deny" --version; dpkg-query -W rustc cargo 2>&1 | grep -c "no packages found"
|
||||
CHECK: cd $HOME/Documents/faunosteo && "$HOME/.cargo/bin/rustup" show active-toolchain | cut -d' ' -f1; "$HOME/.cargo/bin/rustup" component list --installed --toolchain 1.99.0 | grep -c "rustfmt\|clippy"; "$HOME/.cargo/bin/rustup" target list --installed --toolchain 1.99.0 | grep -c "^wasm32-unknown-unknown$"; "$HOME/.cargo/bin/wasm-bindgen" --version; "$HOME/.cargo/bin/cargo-deny" --version; dpkg-query -W rustc cargo 2>&1 | grep -c "no packages found"
|
||||
EXPECT: 1.99.0-x86_64-unknown-linux-gnu ; 2 ; 1 ; wasm-bindgen 0.2.129 ; cargo-deny 0.20.2 ; 2
|
||||
2. Scripts: the two Rust scripts live under scripts/ (not docker/), source the PATH guard, and the root scripts make native the primary path with `:docker` alternatives and a single pre-merge gate.
|
||||
CHECK: ls scripts | tr '\n' ' '; ls docker | grep -c "rust-check.sh\|wasm-build.sh"; grep -c "^\. scripts/rust-env.sh" scripts/rust-check.sh scripts/wasm-build.sh; grep -c '"rust:check": "bash scripts/rust-check.sh"' package.json; grep -c '"rust:check:docker": "bash docker/rust-run.sh bash scripts/rust-check.sh"' package.json; grep -c '"wasm:build": "bash scripts/wasm-build.sh"' package.json; grep -c '"wasm:build:docker": "bash docker/rust-run.sh bash scripts/wasm-build.sh"' package.json; grep -c '"check:all": "bash scripts/check-all.sh"' package.json
|
||||
@@ -28,13 +28,13 @@ Development machine = self-hosted Ubuntu server (native, not WSL, not the VPS) w
|
||||
CHECK: grep -c "gated" crates/worker/src/decode.rs crates/worker/src/sandbox.rs; grep -c "unsafe {" crates/worker/src/decode.rs; grep -c "// SAFETY:" crates/worker/src/decode.rs; grep -c "unsafe {" crates/worker/src/sandbox.rs; grep -c "// SAFETY:" crates/worker/src/sandbox.rs; grep -rc "unsafe {" crates/core/src crates/wasm/src | grep -vc ":0$"; grep -c "width.checked_mul(4)" crates/worker/src/decode.rs; grep -c "c_int::try_from(width \* 4)" crates/worker/src/decode.rs; grep -c 'unsafe_code = "forbid"' Cargo.toml; grep -c 'unsafe_code = "deny"' crates/worker/Cargo.toml
|
||||
EXPECT: decode.rs:0 and sandbox.rs:0 ; 6 ; 6 ; 2 ; 2 ; 0 ; 1 ; 0 ; 1 ; 1
|
||||
7. The native Rust gate is green and the committed ts-rs types do not drift.
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo && PATH="$HOME/.cargo/bin:$PATH" bash scripts/rust-check.sh > /tmp/claude-1000/verify-rust-check.log 2>&1; echo rc=$?; grep -E "^test result" /tmp/claude-1000/verify-rust-check.log | grep -c "ok\."; grep -E "^test result" /tmp/claude-1000/verify-rust-check.log | grep -c " 10 passed\| 9 passed\| 14 passed"; grep -c "bans ok, licenses ok, sources ok" /tmp/claude-1000/verify-rust-check.log; git diff --exit-code -- packages/core-wasm/types > /dev/null && echo SAME
|
||||
CHECK: cd $HOME/Documents/faunosteo && PATH="$HOME/.cargo/bin:$PATH" bash scripts/rust-check.sh > /tmp/claude-1000/verify-rust-check.log 2>&1; echo rc=$?; grep -E "^test result" /tmp/claude-1000/verify-rust-check.log | grep -c "ok\."; grep -E "^test result" /tmp/claude-1000/verify-rust-check.log | grep -c " 10 passed\| 9 passed\| 14 passed"; grep -c "bans ok, licenses ok, sources ok" /tmp/claude-1000/verify-rust-check.log; git diff --exit-code -- packages/core-wasm/types > /dev/null && echo SAME
|
||||
EXPECT: rc=0 ; 12 ; 3 ; 1 ; SAME
|
||||
8. The native wasm build and the TypeScript/WASM proofs pass on the module it produces; the size stays within 1 KB of the R0 builder figure (224 713 B raw).
|
||||
CHECK: cd /home/bchanot/Documents/faunosteo && PATH="$HOME/.cargo/bin:$PATH" bash scripts/wasm-build.sh 2>&1 | grep "faunosteo_wasm_bg.wasm:"; corepack pnpm --filter @faunosteo/core-wasm test:run 2>&1 | grep -E "Tests "
|
||||
CHECK: cd $HOME/Documents/faunosteo && PATH="$HOME/.cargo/bin:$PATH" bash scripts/wasm-build.sh 2>&1 | grep "faunosteo_wasm_bg.wasm:"; corepack pnpm --filter @faunosteo/core-wasm test:run 2>&1 | grep -E "Tests "
|
||||
EXPECT: a line "faunosteo_wasm_bg.wasm: NNNNNN bytes raw, …" with 223713 <= NNNNNN <= 225713 ; "Tests 14 passed (14)"
|
||||
9. The single pre-merge gate passed end to end on this host (native stages, Node pipeline, application image, worker sandbox tests + seccomp derivation, worker runtime read-only), read from the evidence log.
|
||||
CHECK: L=/tmp/claude-1000/-home-bchanot-Documents-faunosteo/71caaac9-9523-489e-bc17-e28e1d4fd532/scratchpad/check-all-2.log; grep -c "^== all checks passed" "$L"; grep -c "DONE rc=0" "$L"; grep -c "== allowlist covers the trace" "$L"; grep -E "Tests [0-9]+ passed" "$L"; grep -c "test result: ok. 16 passed" "$L"
|
||||
CHECK: L=<session scratchpad>/check-all-2.log; grep -c "^== all checks passed" "$L"; grep -c "DONE rc=0" "$L"; grep -c "== allowlist covers the trace" "$L"; grep -E "Tests [0-9]+ passed" "$L"; grep -c "test result: ok. 16 passed" "$L"
|
||||
EXPECT: 1 ; 1 ; 1 ; six per-package lines (domain 194, core-wasm 14, supabase 24, anatomy 130, pdf 137, app 278 = 777, every one "passed") ; 1
|
||||
10. Documentation reflects the three environments and the CI status; no doc still claims a Docker-only or CI-run toolchain.
|
||||
CHECK: grep -c "native on the development machine" docs/development/RUST.md; grep -c "prepared, no CI active" docs/development/RUST.md; grep -c "### 5.8 Native toolchain run" docs/development/RUST.md; grep -c "C.1 Addendum 2026-10-13" docs/development/RUST_ARCHITECTURE_REVIEW.md; for f in CLAUDE.md README.md CHANGELOG.md docs/development/RUST.md docs/development/TEST_STRATEGY.md; do grep -c "check:all" $f; done | tr '\n' ' '; grep -c "no toolchain on the host\|never on the host\|all through the builder image" CLAUDE.md docs/development/RUST.md docs/development/WORKSPACE.md | grep -vc ":0$"; grep -c "(not implemented" docs/development/RUST.md docs/development/RUST_ARCHITECTURE_REVIEW.md | grep -vc ":0$"; grep -c "No CI/CD\|no CI active\|No CI runs" DEPLOY.md CLAUDE.md README.md | grep -vc ":0$"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- date: 2026-10-13 | flow: ad-hoc phase (owner go 2026-10-12, BDR-045) | branch: feature/rust-r0-foundation (base develop = 5fec065)
|
||||
- status: active (amended 2026-10-13 after verifier pass 1: criteria 10 and 14 oracles counted comment lines; pass 2 CONFORME 16/16, criterion 16 oracle excludes the contract file itself; pass 3 after the security fixes: criteria 10 and 11 oracles updated to the gated SAFETY form and the second refusal arm; no code change)
|
||||
- spec: docs/development/RUST_ARCHITECTURE_REVIEW.md (Part III, Annex B, Annex C), docs/development/RUST.md (what was built and proven)
|
||||
- evidence logs (runs made by the orchestrator on this host, readable): /tmp/claude-1000/-home-bchanot-Documents-faunosteo/2fbc125b-9811-4458-8ebc-489c2f9255be/scratchpad/{pnpm-check.log,worker-test-build-5.log,worker-image-build-2.log,builder-build-2.log}
|
||||
- evidence logs (runs made by the orchestrator on this host, readable): <session scratchpad>/{pnpm-check.log,worker-test-build-5.log,worker-image-build-2.log,builder-build-2.log}
|
||||
|
||||
## REQUEST (owner brief 2026-10-12, condensed — IMMUTABLE)
|
||||
Implement R0 per Annex B: Cargo workspace with crates core, wasm, worker; pinned Rust and dependencies; reproducible Docker builder (no Rust on the VPS); native and WebAssembly compilation; working TypeScript bindings; JSON contracts compatible with the current data; first wasm size and performance measurements; applicable security and isolation tests; CI integration; development and deployment documentation. The seven proofs run in the real environment where possible (serialisation, wasm panics, musl, seccomp verified experimentally; a proof that cannot be obtained is reported, not assumed). Compatibility: the React app, Report v3, PDF v2/v3, Supabase, the interfaces and the existing tests stay unchanged; the frontend does not load the module. No migration of anatomy, PDF or business validations (R2–R5); no avatar business processing (R1). Everything dockerised; production images built in CI and pulled by the VPS; live deployment unchanged; no tag or merge into main.
|
||||
@@ -33,7 +33,7 @@ Implement R0 per Annex B: Cargo workspace with crates core, wasm, worker; pinned
|
||||
CHECK: grep -c "tokio" crates/worker/Cargo.toml; grep -n "vars_os().next().is_some()\|sandbox::apply(\|read_to_end(&mut input)" crates/worker/src/decode.rs | head -3; grep -n "ensure_single_thread()?;\|set_rlimits(limits)?;\|install_seccomp()?;" crates/worker/src/sandbox.rs | head -3
|
||||
EXPECT: 0 ; the three lines appear in that order (env check line < sandbox line < read line) ; the three calls appear in that order
|
||||
9. seccomp allowlist is the traced set plus the abort path, denies every file and process syscall, and was derived and proven on the musl binary.
|
||||
CHECK: sed -n '/^pub const ALLOWED_SYSCALLS/,/^];/p' crates/worker/src/sandbox.rs | grep -c '("'; sed -n '/^pub const ABORT_PATH_SYSCALLS/,/^];/p' crates/worker/src/sandbox.rs | grep -c '("'; grep -c "open\|execve\|clone\|socket" <(sed -n '/^pub const ALLOWED_SYSCALLS/,/^];/p' crates/worker/src/sandbox.rs); grep -E "test result: ok. 16 passed|allowlist covers the trace" /tmp/claude-1000/-home-bchanot-Documents-faunosteo/2fbc125b-9811-4458-8ebc-489c2f9255be/scratchpad/worker-test-build-11.log | sed -E 's/^#[0-9]+ [0-9.]+ //' | sort -u
|
||||
CHECK: sed -n '/^pub const ALLOWED_SYSCALLS/,/^];/p' crates/worker/src/sandbox.rs | grep -c '("'; sed -n '/^pub const ABORT_PATH_SYSCALLS/,/^];/p' crates/worker/src/sandbox.rs | grep -c '("'; grep -c "open\|execve\|clone\|socket" <(sed -n '/^pub const ALLOWED_SYSCALLS/,/^];/p' crates/worker/src/sandbox.rs); grep -E "test result: ok. 16 passed|allowlist covers the trace" <session scratchpad>/worker-test-build-11.log | sed -E 's/^#[0-9]+ [0-9.]+ //' | sort -u
|
||||
EXPECT: 7 ; 7 ; 0 ; both lines present
|
||||
10. The keyed parent never decodes: spawn.rs and webp_check.rs use no image decoder; output capped at 512 KiB; the RIFF check allowlists four chunk types and refuses the rest.
|
||||
CHECK: grep -c "image::" crates/worker/src/spawn.rs crates/worker/src/webp_check.rs; grep -c "MAX_OUTPUT_BYTES: usize = 512 \* 1024" crates/worker/src/limits.rs; grep -c 'b"VP8X", b"VP8 ", b"VP8L", b"ALPH"' crates/worker/src/webp_check.rs; grep -c "return Err(WebpIssue::ForbiddenChunk(fourcc))" crates/worker/src/webp_check.rs
|
||||
@@ -42,10 +42,10 @@ Implement R0 per Annex B: Cargo workspace with crates core, wasm, worker; pinned
|
||||
CHECK: grep -l "libwebp_sys::" crates/worker/src/*.rs; grep -c "// SAFETY" crates/worker/src/decode.rs; grep -c "MIN_LIBWEBP_VERSION: (u8, u8, u8) = (1, 6, 0)" crates/worker/src/limits.rs; grep -c "the_linked_libwebp_is_recent_enough" crates/worker/tests/sandbox.rs
|
||||
EXPECT: crates/worker/src/decode.rs only ; >= 4 ; 1 ; 1
|
||||
12. Test hooks never ship: release build without features; the runtime image is distroless static, non-root, with `run --check` as its command.
|
||||
CHECK: grep -n "cargo build -p faunosteo-worker --release --locked" crates/worker/Dockerfile | grep -c "features"; grep -c "FROM gcr.io/distroless/static-debian12:nonroot" crates/worker/Dockerfile; grep -c "^USER nonroot" crates/worker/Dockerfile; grep -c 'CMD \["run", "--check"\]' crates/worker/Dockerfile; tail -1 /tmp/claude-1000/-home-bchanot-Documents-faunosteo/2fbc125b-9811-4458-8ebc-489c2f9255be/scratchpad/worker-image-build-6.log
|
||||
CHECK: grep -n "cargo build -p faunosteo-worker --release --locked" crates/worker/Dockerfile | grep -c "features"; grep -c "FROM gcr.io/distroless/static-debian12:nonroot" crates/worker/Dockerfile; grep -c "^USER nonroot" crates/worker/Dockerfile; grep -c 'CMD \["run", "--check"\]' crates/worker/Dockerfile; tail -1 <session scratchpad>/worker-image-build-6.log
|
||||
EXPECT: 0 ; 1 ; 1 ; 1 ; exit=0
|
||||
13. Frontend, live deployment and database untouched; the existing suites still pass.
|
||||
CHECK: git diff --stat 5fec065..HEAD -- apps/app Dockerfile docker-compose.yml docker/nginx.conf docker/entrypoint.sh supabase packages/domain packages/anatomy packages/pdf packages/supabase | wc -l; tail -1 /tmp/claude-1000/-home-bchanot-Documents-faunosteo/2fbc125b-9811-4458-8ebc-489c2f9255be/scratchpad/pnpm-check.log; grep -E "apps/app test:run:\s+Tests|packages/pdf test:run:\s+Tests|packages/anatomy test:run:\s+Tests" /tmp/claude-1000/-home-bchanot-Documents-faunosteo/2fbc125b-9811-4458-8ebc-489c2f9255be/scratchpad/pnpm-check.log
|
||||
CHECK: git diff --stat 5fec065..HEAD -- apps/app Dockerfile docker-compose.yml docker/nginx.conf docker/entrypoint.sh supabase packages/domain packages/anatomy packages/pdf packages/supabase | wc -l; tail -1 <session scratchpad>/pnpm-check.log; grep -E "apps/app test:run:\s+Tests|packages/pdf test:run:\s+Tests|packages/anatomy test:run:\s+Tests" <session scratchpad>/pnpm-check.log
|
||||
EXPECT: 0 ; exit=0 ; 278, 137, 130 passed
|
||||
14. CI: rust job before check through the builder image with the types drift check; docker job builds the worker test stage and starts the runtime image read-only with every capability dropped; advisories nightly; release-images manual only and deploys nothing.
|
||||
CHECK: grep -c "needs: rust" .gitea/workflows/ci.yml; grep -c "docker/rust-check.sh\|git diff --exit-code -- packages/core-wasm/types" .gitea/workflows/ci.yml; grep -c -- "--target test\|--read-only --cap-drop ALL" .gitea/workflows/ci.yml; grep -v "^#" .gitea/workflows/release-images.yml | grep -c "^ workflow_dispatch:"; grep -v "^#" .gitea/workflows/release-images.yml | grep -cE "^\s*(push|pull_request|schedule):|ssh |scp |compose (up|pull)"; grep -c "cron:" .gitea/workflows/rust-advisories.yml
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
- date: 2026-10-21 | flow: verify (R4.10 gates) | branch: feature/rust-r4-pdf-core
|
||||
- status: active
|
||||
- base: 4509313 (R4.9 tip); diff under review: 4509313..HEAD; run every CHECK from the repository root
|
||||
- harness env: `PLAYWRIGHT_NODE_MODULES=/home/bchanot/.local/lib/node_modules/gsd-pi/node_modules`; build in apps/app/dist (`pnpm build:preview`)
|
||||
- harness env: `PLAYWRIGHT_NODE_MODULES=$HOME/.local/lib/node_modules/gsd-pi/node_modules`; build in apps/app/dist (`pnpm build:preview`)
|
||||
|
||||
## REQUEST (verbatim — IMMUTABLE)
|
||||
FAUNOSTEO — Précisions définitives J1/J2 et diagnostic des anomalies
|
||||
@@ -96,7 +96,7 @@ Présente-moi tes conclusions et les instructions de revalidation avant toute cl
|
||||
2. Anomaly A, cause shown with proof: `scripts/browser/serve.mjs` sends exactly `docker/nginx.conf`'s Cache-Control values (`no-store, no-cache, must-revalidate` on /env.js, `public, max-age=31536000, immutable` on /assets/ files) and nothing else in its behaviour changes (bind address checks, CSP, mounts, 404 and SPA fallback, report-uri).
|
||||
CHECK: `git diff 4509313 -- scripts/browser/serve.mjs`; `grep -n Cache-Control docker/nginx.conf`
|
||||
3. Regression harness: `scripts/browser/r4-offline-import.mjs` runs J1.7 (online import, network cut by Playwright offline mode and by killing the server, « Accueil », pick through « Remplacer ») on the three engines, checks the headers, exits 1 when a Chromium or Firefox row does not open the editor or any row has a page error or no answer; the committed results file shows 6 runs with empty `problems`.
|
||||
CHECK: `PLAYWRIGHT_NODE_MODULES=/home/bchanot/.local/lib/node_modules/gsd-pi/node_modules node scripts/browser/r4-offline-import.mjs --out /tmp/r4-offline-verify.json; echo exit=$?` → exit=0
|
||||
CHECK: `PLAYWRIGHT_NODE_MODULES=$HOME/.local/lib/node_modules/gsd-pi/node_modules node scripts/browser/r4-offline-import.mjs --out /tmp/r4-offline-verify.json; echo exit=$?` → exit=0
|
||||
4. Anomaly A, unproven part stated as unproven: RUST.md §10.12 does not claim the cause of the frozen file picker; it states it was not reproduced and gives a discriminating step; the WebKit headless limit is stated as such, Safari iOS unknown.
|
||||
CHECK: `sed -n '/### 10.12/,$p' docs/development/RUST.md`
|
||||
5. Anomaly B diagnosis with no behaviour change: no file under `apps/`, `crates/`, `packages/`, `supabase/`, goldens or oracles changed; the §10.12 claims hold: the nologos reference's archive has the four logo slots null, `apps/app/src/pdf/export.ts` passes `loadBranding()` (bundled logos) at HEAD and at 66909b6, the archived branding reaches the writer only via `export_from_envelope`; an owner decision is requested; `R4_J2.md` J2.3 expected result unchanged.
|
||||
|
||||
@@ -19,13 +19,18 @@ Message 2, « Rectification définitive J1.7 / M1 / M2 »:
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
- `docs/development/R4_J2.md` (J2.3 expected result), `R4_J2_RESULTS.md`, `R4_J1_RESULTS.md`, `R4_MINI_RECETTE.md`, `RUST.md` §10.11 (count), §10.12 (decisions, C paragraph), `CHANGELOG.md`, `CLAUDE.md` (map line)
|
||||
- `.gitleaks.toml` (the one description string)
|
||||
- `apps/app/src/components/brand/Footer.tsx`, `apps/app/src/assets/brand/zenquality-logo-horizontal.png` (new), `apps/app/tests/unit/components.Footer.test.tsx` (new)
|
||||
- `scripts/browser/r4-app-csp.mjs`, `scripts/browser/results/2026-10-21-r4-{csp,offline-import}.json` (new)
|
||||
- `.claude/tasks/TODO.md`, memory
|
||||
Range: `git diff 1814a8d` (the base above) to the branch head. Every path
|
||||
the range touches is listed here; anything else is out of scope.
|
||||
|
||||
Out of scope: `crates/**`, `packages/**`, `apps/app/src/pdf/**`, the goldens, the oracles, the R4 digests, DEPLOY.md's CSP, `docker/nginx.conf`, any deletion.
|
||||
- `docs/development/R4_J1.md` (Safari iOS rule), `R4_J2.md` (J2.3 expected result, Safari iOS rule), `R4_J2_RESULTS.md`, `R4_J1_RESULTS.md`, `R4_MINI_RECETTE.md`, `RUST.md` §10.11 (count, marker wording), §10.12 (decisions, C paragraph, D owner decisions), `CHANGELOG.md`, `CLAUDE.md` (map line)
|
||||
- `.gitleaks.toml` (the one description string)
|
||||
- `apps/app/src/components/brand/Footer.tsx`, `apps/app/src/assets/brand/zenquality-logo-horizontal.png` (new), `apps/app/tests/unit/components.Footer.test.tsx` (new, protocol-relative regex 1877c4b)
|
||||
- `scripts/browser/r4-app-csp.mjs`, `scripts/browser/results/2026-10-21-r4-{csp,offline-import}.json` (new)
|
||||
- `scripts/browser/lib/app-build.mjs` (results name the build relative to the repository), and the redaction of absolute local paths (the `distDir` line only) in `scripts/browser/results/2026-10-19-{r4-export,r4-export-series,r4-export-series-chromium-12,ts-export,ts-export-series-chromium}.json`, `2026-10-20-{r4-memory-bench,r4-memory-bench-chromium-L16-export,r4-memory-bench-chromium-L16-raster,r4-offline-import}.json`; `scripts/browser/README.md` (one example path); `docs/history/superpowers/plans/2026-05-23-responsive-mobile.md` (paths only)
|
||||
- `.claude/tasks/contracts/2026-10-21-rust-r4-decisions-1500.md` (this contract), and the redaction of absolute local paths in `.claude/tasks/contracts/2026-10-11-step-06-phase-{0-freeze,1-domain,2-compose,3-engine,4-app}.md`, `2026-10-13-rust-r0-native-verify.md`, `2026-10-13-rust-r0-verify.md`, `2026-10-21-rust-r4-anomalies-1000.md` (`/home/<user>/` → `$HOME/`, session scratchpad → `<session scratchpad>`)
|
||||
- `.claude/tasks/TODO.md`, `.claude/memory/decisions.md` (BDR-066), `.claude/memory/learnings.md` (LRN-067, LRN-068), `.claude/memory/journal.md`
|
||||
|
||||
Out of scope: `crates/**`, `packages/**`, `apps/app/src/pdf/**`, the goldens, the oracles, the R4 digests, `crates/core/tests/pdf/LEDGER.tsv` (generated byte for byte by `scripts/r4-ledger.mjs`), DEPLOY.md's CSP, `docker/nginx.conf`, any deletion.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
|
||||
@@ -38,6 +43,14 @@ Out of scope: `crates/**`, `packages/**`, `apps/app/src/pdf/**`, the goldens, th
|
||||
7. The app suite, typecheck and lint green: `pnpm typecheck`, `pnpm lint`, `cd apps/app && ./node_modules/.bin/vitest run` (59 files, 429 cases); the headless results are never written into a device cell of the results grids (every device cell of `R4_J1_RESULTS.md` and `R4_J2_RESULTS.md` other than J1.7 Firefox and Brave stays `NON TESTÉ` or `not applicable`).
|
||||
8. Docs: RUST.md §10.12 carries the J2.3 decision, the J1.7 rectification (cause not claimed) and the C paragraph (impact, where the policy lives, the live site's header, why the recettes did not report it, the fix and its proofs); CHANGELOG Unreleased has the footer entry; CLAUDE.md map line names the footer logo.
|
||||
|
||||
9. Owner decisions of 2026-10-21 recorded: RUST.md §10.12 holds a « D. Owner decisions recorded » paragraph (J1.7 PASS with the reserve, M3 complementary and not blocking, J2.3 option 1 final, the logo and the CSP proof validated, the marker valid with its writing delegable, the 23 deletions with no further one, Safari iOS on the real iPhone only); §10.11 no longer says « only the owner adds the marker » nor « the owner's own `[gated]` line » and calls 21 a census error (`grep -c "only the owner adds the marker\|owner's own \`\[gated\]\`" docs/development/RUST.md` = 0; `grep -c "census" docs/development/RUST.md` ≥ 1); BDR-066 in `.claude/memory/decisions.md`.
|
||||
10. Recette docs: `R4_MINI_RECETTE.md` names M3 a complementary control, not blocking, and leaves it NON TESTÉ; `R4_J1.md`, `R4_J2.md`, `R4_J1_RESULTS.md`, `R4_J2_RESULTS.md` state that Safari iOS stays NON TESTÉ until the real iPhone and that a simulator is never a memory proof (`grep -ci simulator` ≥ 1 in each); every iPhone cell of both results grids reads `NON TESTÉ` or `not applicable` (criterion 7).
|
||||
11. Redaction: `git grep -n -I -E "/home/bchano[t]|-home-bchano[t]"` prints nothing (the bracket keeps this line from matching itself); the modified results JSON change the `distDir` line only (`git diff 1814a8d --diff-filter=M -- scripts/browser/results | grep -E '^[-+] ' | grep -vc distDir` = 0; the two 2026-10-21 files are new and covered by criterion 6); `scripts/browser/lib/app-build.mjs` reports `distDir` relative to the repository (`node -e "import('./scripts/browser/lib/app-build.mjs').then(m=>console.log(m.checkBuild().distDir))"` prints `apps/app/dist` when a build is present).
|
||||
12. `pnpm check:all` exits 0 on the final code state (run by the executor, log path and tail in its report; re-run by the verifier only if needed).
|
||||
|
||||
## CLARIFICATIONS
|
||||
|
||||
Q: apply the fix or only present it? / A: the owner asked for a targeted fix with a bundled resource and no branding change; the bundled file is the exact remote file, so the picture does not change; applied on the branch, reversible by the owner. [gated 2026-10-21, owner's message 1]
|
||||
|
||||
Q: the owner's message 1 says « 21 suppressions »; which count is authorized? / A: 23, all from 0dc1ba2; 21 was a census error, confirmed by the owner on 2026-10-21; the quote in REQUEST stays verbatim. [gated 2026-10-21, owner's verdict]
|
||||
Q: scope declaration / A: pass 1 of the verifier found the contract file itself missing from FILE SCOPE (formal gap, 8/8 MET); FILE SCOPE now lists this file, the memory files by name and the redactions; no criterion was removed.
|
||||
Reference in new issue
Block a user