chore(memory): R4.11 contract oracles: no local path, lockfile regex covers integrity lines, negative TLS proof run by the orchestrator, floor waiver for the quoted pattern
This commit is contained in:
1 parent
e91229362c
commit
c9243b50dd
1 file changed
+4
-3
@@ -31,13 +31,13 @@ Out of scope: every file under `crates/worker/src`, `crates/core`, `crates/wasm`
|
||||
## ACCEPTANCE CRITERIA
|
||||
|
||||
1. Rust versions: `grep -A1 '^name = "rustls-webpki"' Cargo.lock` shows `0.103.16`, `webpki-roots` `1.0.10`; `cargo tree -i rustls-webpki -e normal` and `cargo tree -i webpki-roots -e normal` reach the workspace only through `ureq` → `faunosteo-worker`; `cargo deny check advisories` exits 0 (it exited 1 on 8943bf3 with the two ids); `deny.toml` unchanged (`git diff 8943bf3 -- deny.toml` empty) and its `ignore = []` still empty.
|
||||
2. Node versions: `apps/app/package.json` has `"react-router-dom": "^7.18.4"`; `pnpm list -r --depth 2 react-router-dom` resolves `react-router-dom 7.18.4` and `react-router 7.18.4`; `pnpm audit --prod` prints `No known vulnerabilities found`; the lockfile diff from 8943bf3 touches only the react-router and react-router-dom entries (`git diff 8943bf3 -- pnpm-lock.yaml | grep -E '^[-+] ' | grep -vcE 'react-router|specifier: \^7|version: 7\.1[58]'` = 0).
|
||||
2. Node versions: `apps/app/package.json` has `"react-router-dom": "^7.18.4"`; `pnpm list -r --depth 2 react-router-dom` resolves `react-router-dom 7.18.4` and `react-router 7.18.4`; `pnpm audit --prod` prints `No known vulnerabilities found`; the lockfile diff from 8943bf3 touches only the react-router and react-router-dom entries (`git diff 8943bf3 -- pnpm-lock.yaml | grep -E '^[-+] ' | grep -vcE 'react-router|specifier: \^7|version: 7\.1[58]|resolution: \{integrity: sha512-'` = 0).
|
||||
3. One commit per update: `git log --oneline 8943bf3..HEAD -- Cargo.lock` shows the webpki commit (7a7b71c) and the test commit (a604c07) and no other lockfile change; `git log --oneline 8943bf3..HEAD -- pnpm-lock.yaml apps/app/package.json` shows the react-router commit (c9dab63) alone.
|
||||
4. No application or worker source change: `git diff --stat 8943bf3 -- apps/app/src crates/worker/src crates/core crates/wasm packages docker DEPLOY.md .gitleaks.toml` is empty; no deletion in the range (`git diff --diff-filter=D --name-only 8943bf3` empty); no new suppression (`git diff 8943bf3 | grep -E '^\+.*(nosemgrep|nosec|eslint-disable|allow\(|gitleaks:allow|ignore = \[)'` prints nothing but the test file's `#![allow(clippy::unwrap_used, clippy::expect_used)]`, the convention of every worker test file).
|
||||
5. TLS proof: `cargo test -p faunosteo-worker --test tls` passes; the test builds a `HttpBackend` from `https://127.0.0.1:<port>` against an in-process rustls server with a self-signed certificate, expects `BackendError::Network` whose message contains `certificate`, asserts the service key string is absent from the message, and asserts the server saw the connection dropped (no request). Negative proof: with `.tls_config(ureq::tls::TlsConfig::builder().disable_verification(true).build())` added to the agent builder in `crates/worker/src/http.rs` (temporary edit), the test fails with `expected a network error, got Ok([])`; restore with `git checkout -- crates/worker/src/http.rs` and leave the tree clean.
|
||||
5. TLS proof: `cargo test -p faunosteo-worker --test tls` passes; the test builds a `HttpBackend` from `https://127.0.0.1:<port>` against an in-process rustls server with a self-signed certificate, expects `BackendError::Network` whose message contains `certificate`, asserts the service key string is absent from the message, and asserts the server saw the connection dropped (no request). Negative proof, run by the orchestrator (a verifier edits no tree): with `.tls_config(ureq::tls::TlsConfig::builder().disable_verification(true).build())` added to the agent builder in `crates/worker/src/http.rs` (temporary edit, restored with `git checkout --`), the test failed at tls.rs `expected a network error, got Ok([])` (orchestrator log quoted in the verifier's brief); the verifier checks by reading that the test panics on any `Ok` and that the server answers `[]` after a completed handshake.
|
||||
6. Dev-dependencies: `crates/worker/Cargo.toml` adds `rustls` (default-features false, `ring`, `std`, `tls12`) and `rcgen` (default-features false, `ring`) under `[dev-dependencies]` only; `cargo tree -p faunosteo-worker -e normal` (no dev edges) lists neither; `cargo deny check` (all four checks) exits 0.
|
||||
7. Suites: `pnpm rust:check` exits 0; `cd apps/app && ./node_modules/.bin/vitest run` → 59 files, 429 cases (includes `guards.RequireAuth`, `routes.LoginRoute`, `routes.SignupRoute`, `routes.HomeRoute.*`, `routes.EditorRoute.*`, `auth.validation` with `safeNextPath`); `pnpm typecheck` and `pnpm lint` exit 0; `git status --short` empty afterwards (the wasm module may need `pnpm wasm:build` first: the lockfile is a BUILD_STAMP input; the shipped bytes stay 1,535,289 raw).
|
||||
8. `pnpm check:all` exit 0 on the final code state (orchestrator log `/tmp/claude-1000/-home-bchanot-Documents-faunosteo/5820a0e5-f45f-40af-9f9c-e276cff38b12/scratchpad/checkall-r411.log`, ending `== all checks passed`; the musl test stage runs `tests/tls.rs` too, `grep -n "tests/tls.rs" <log>` finds it in the Docker stage with `1 passed`); read the log, do not re-run.
|
||||
8. `pnpm check:all` exit 0 on the final code state (orchestrator log `<session scratchpad>/checkall-r411.log`, path given in the verifier's brief, never in a tracked file; ending `== all checks passed`; the musl test stage runs `tests/tls.rs` too, `grep -n "tests/tls.rs" <log>` finds it in the Docker stage with `1 passed`); read the log, do not re-run.
|
||||
9. Goldens and oracles unchanged: `git diff --stat 8943bf3 -- apps/app/tests/fixtures crates/core/tests` empty.
|
||||
10. Docs: RUST.md §10.13 holds the table (advisory, component and path, before, after, audit, residual) for the five advisories, the exposure analysis (BrowserRouter SPA, `safeNextPath`, no server), the TLS proof with its negative run and its honest limit, the dev-dependency note, and the checks; CHANGELOG Unreleased has the dependency line.
|
||||
11. Criterion 11 of the previous contract no longer names a local username: `grep -c "bchano" .claude/tasks/contracts/2026-10-21-rust-r4-decisions-1500.md` = 0, and its generic rule `git grep -n -I -E "/home/[a-z][a-z0-9_-]*/|-home-[a-z][a-z0-9_-]*-" | grep -v "/home/deploy/"` still prints nothing.
|
||||
@@ -47,3 +47,4 @@ Out of scope: every file under `crates/worker/src`, `crates/core`, `crates/wasm`
|
||||
|
||||
Q: 7.18.2 (the owner's minimum) or 7.18.4 (latest 7.x)? / A: 7.18.4: the owner allows « une version stable supérieure compatible »; patch-level changelog, published 2026-09-15, React 19 and Node 24 compatible. [gated 2026-10-21, owner's §1]
|
||||
Q: a TLS test needs dev-dependencies (rcgen); allowed? / A: the owner asked for TLS tests « dans la mesure où l'environnement le permet »; dev-only, from the rustls project, named in §10.13; no runtime dependency changes. [gated 2026-10-21, owner's §4]
|
||||
Q: criterion 4 quotes the suppression-grep pattern in its own text; does the floor count it? / A: no: it is the oracle's command, not a suppression in code; waived for this contract file only. [gated 2026-10-21, oracle wording]
|
||||
Reference in new issue
Block a user