docs(docs): R4.11 dependency maintenance: RUST.md §10.13 table and TLS proof, CHANGELOG, contract, previous contract's redaction rule made generic, TODO
This commit is contained in:
1 parent
a604c07f50
commit
e91229362c
5 files changed
+105
-6
No files matched your search
@@ -45,7 +45,7 @@ Out of scope: `crates/**`, `packages/**`, `apps/app/src/pdf/**`, the goldens, th
|
||||
|
||||
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).
|
||||
11. Redaction: `git grep -n -I -E "/home/[a-z][a-z0-9_-]*/|-home-[a-z][a-z0-9_-]*-" | grep -v "/home/deploy/"` prints nothing (any home directory of any user, in path or in the session-folder spelling; the VPS service account `/home/deploy/` of the DEPLOY.md runbook is the one legitimate home path); 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
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
# Contract: R4.11 dependency maintenance before the R4 merge
|
||||
|
||||
Base: 8943bf3 on `feature/rust-r4-pdf-core`. Date: 2026-10-21. Range: `8943bf3..HEAD`.
|
||||
|
||||
## REQUEST (verbatim, owner, « Dernière maintenance de sécurité avant clôture R4 »)
|
||||
|
||||
« Trois dépendances nécessitent une vérification et, si les versions affectées sont présentes, une mise à jour : rustls-webpki : RUSTSEC-2026-0382. webpki-roots : RUSTSEC-2026-0381. react-router : avis concernant les versions antérieures à 7.18.2, selon les plages affectées. […] Ces numéros ne remplacent pas la vérification des contraintes réelles du monorepo et des dépendances transitives. »
|
||||
|
||||
« Avant modification, établir : les versions actuellement résolues, les chemins de dépendances qui les introduisent, les composants effectivement concernés, l'exposition réelle de Faunosteo aux vulnérabilités, les versions corrigées disponibles et compatibles, les éventuels changements d'API ou de comportement attendus. Pour react-router, vérifier le mode utilisé par l'application, les appels Link, useNavigate et redirect, ainsi que le traitement des destinations provenant de données non fiables. Pour Rust, vérifier notamment la chaîne TLS du worker, les certificats de confiance et les compatibilités avec rustls. »
|
||||
|
||||
« Effectuer les mises à jour minimales raisonnables, avec commits séparés et traçables. Préserver les comportements métier. Ne pas changer l'architecture React ou Rust simplement pour réaliser une montée de version. Ne pas introduire d'exclusion de sécurité pour masquer les alertes. Si une mise à jour nécessite une migration importante ou présente un risque de régression significatif, arrête-toi et présente-moi les alternatives avant de continuer. »
|
||||
|
||||
« Après mise à jour : pnpm check:all. Audit npm/pnpm des dépendances de production. Cargo deny et contrôle des avis RustSec. Tests des parcours React Router concernés. Tests d'authentification, navigation, redirections et liens pertinents. Tests TLS du worker avec validation effective des certificats, dans la mesure où l'environnement le permet. Construction des images et tests sandbox. Vérification que les oracles PDF et les goldens restent inchangés. Audit de sécurité indépendant ciblé sur les mises à jour. Ne pas qualifier les vulnérabilités de corrigées uniquement parce que la compilation passe. »
|
||||
|
||||
« Présenter un tableau avec chaque avis, l'ancienne version, la nouvelle version, le résultat de l'audit et les risques résiduels. Si toutes les mises à jour sont compatibles et les grilles vertes, considérer la maintenance prête, mais attends toujours mon signal final. »
|
||||
|
||||
« M3 reste facultatif et NON TESTÉ. Safari iOS physique reste NON TESTÉ et nécessaire avant la fusion. Ne pas modifier la règle J2.3 ni relancer le diagnostic J1.7 sans nouveau défaut prouvé. Conserver les corrections Cache-Control et CSP. Si le critère de vérification contient inutilement un nom d'utilisateur local, le remplacer par une règle générique équivalente sans réduire sa couverture. Rester sur feature/rust-r4-pdf-core. Aucune fusion dans develop sans mon autorisation. Ne commence pas R5. Ne publie pas la release 0.2.0. Ne déploie rien sur faunosteo.com. »
|
||||
|
||||
## FILE SCOPE
|
||||
|
||||
Every path the range touches is listed here; anything else is out of scope.
|
||||
|
||||
- `Cargo.lock` (two crate bumps, then rcgen's tree), `crates/worker/Cargo.toml` (`[dev-dependencies]` only), `crates/worker/tests/tls.rs` (new)
|
||||
- `apps/app/package.json` (`react-router-dom` range), `pnpm-lock.yaml` (react-router, react-router-dom)
|
||||
- `docs/development/RUST.md` §10.13 (new), `CHANGELOG.md` (Unreleased, Fixed 2026-10-21)
|
||||
- `.claude/tasks/contracts/2026-10-21-rust-r4-decisions-1500.md` (criterion 11 wording), `.claude/tasks/contracts/2026-10-21-rust-r4-maintenance-1700.md` (this contract)
|
||||
- `.claude/tasks/TODO.md`, `.claude/memory/{journal,learnings,decisions}.md`
|
||||
|
||||
Out of scope: every file under `crates/worker/src`, `crates/core`, `crates/wasm`, `apps/app/src`, `packages/`, `apps/app/tests/fixtures`, `crates/core/tests`, `docker/`, `DEPLOY.md`, `.gitleaks.toml`, `deny.toml`, the recette documents and results; any deletion.
|
||||
|
||||
## 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).
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
12. Recette state untouched: `git diff --stat 8943bf3 -- docs/development/R4_J1.md docs/development/R4_J2.md docs/development/R4_J1_RESULTS.md docs/development/R4_J2_RESULTS.md docs/development/R4_MINI_RECETTE.md` empty (J2.3 rule, J1.7, M3 and Safari iOS cells as the owner left them).
|
||||
|
||||
## CLARIFICATIONS
|
||||
|
||||
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]
|
||||
Reference in new issue
Block a user