Files
faunosteo/.claude/tasks/contracts/2026-10-21-rust-r4-decisions-1500.md
T

12 KiB
Raw Blame History

Contract: R4.10 owner decisions (J2.3 option 1, gitleaks marker, R4.8 trace, ZenQuality logo) and the J1.7 rectification

Base: 1814a8d on feature/rust-r4-pdf-core. Date: 2026-10-21.

REQUEST (verbatim, owner, two messages)

Message 1, « Décisions R4.10 et préparation de la mini-recette »:

  • J2.3: « Je choisis définitivement l'option 1. Conserver le comportement historique : les nouveaux exports effectués depuis l'éditeur utilisent le branding actuel de Faunosteo, même lorsque le document importé provient d'une archive sans logos. […] Corrige uniquement l'attendu incorrect de J2.3 et les documents de recette associés. Ne modifie ni le comportement du moteur, ni les goldens, ni les oracles pour ce point. »
  • J1.7: « J'accepte le correctif des en-têtes de cache du serveur de recette et les contrôles de sécurité associés. […] Ne considère pas J1.7 comme définitivement validé. […] Ne suppose pas que la piste du partage réseau est confirmée. Le test Ctrl+O est un indice de diagnostic, pas une preuve suffisante à lui seul. Préserve les résultats actuels des tests automatisés. »
  • Safari iOS: « La validation Safari iOS réelle reste en attente. […] Un simulateur iPhone ne remplacera pas les mesures de mémoire sur matériel réel. »
  • Marqueurs: « Je réitère mon autorisation d'ajouter le marqueur exact [gated 2026-10-18] à l'exception strictement ciblée de .gitleaks.toml. […] Applique-la sans élargir la portée de l'exception. Vérifie également que l'autorisation des 21 suppressions de tests de R4.8 est correctement tracée, sans créer de nouvelle suppression. »
  • ZenQuality: « Vérifie son impact réel sur l'application et sur les exports PDF. Précise si cette ressource est effectivement absente du rendu en build de production et pourquoi les recettes précédentes n'ont pas détecté ce problème. Si un défaut est confirmé, présente un correctif ciblé. Privilégie une ressource locale embarquée, si possible et autorisée, plutôt qu'un assouplissement injustifié de la CSP. Ne modifie pas le branding produit sans décision préalable. »
  • Livraison: « Mets à jour les documents correspondant à mes décisions. Exécute les vérifications ciblées nécessaires et conserve les audits précédents. Ne transforme pas les tests headless en résultats humains. Attends mon retour sur M1 à M5 et Safari avant de conclure R4. Reste sur feature/rust-r4-pdf-core. Aucune fusion dans develop. Ne commence pas R5. Ne publie pas la release 0.2.0. Ne déploie rien sur faunosteo.com. »

Message 2, « Rectification définitive J1.7 / M1 / M2 »:

« Lorsque la connexion réseau du système est coupée, le sélecteur de fichiers met environ une minute à s'ouvrir, aussi bien depuis Ctrl+O dans un onglet vide que depuis le bouton « Importer » de Faunosteo. Une fois le sélecteur ouvert, les imports hors ligne fonctionnent normalement. Résultats corrigés : M1 : PASS avec délai d'environ 60 secondes. M2 : PASS avec délai d'environ 60 secondes. J1.7 : PASS fonctionnel, avec réserve de performance concernant l'ouverture du sélecteur. M3 : NON TESTÉ. M4/M5 : NON TESTÉ dans la mini-recette ; les validations J1 antérieures restent déclarées. Le comportement est constaté hors de Faunosteo également. […] Conserve la correction des en-têtes Cache-Control […]. Mets à jour les résultats et le suivi R4.10, sans présenter l'origine exacte des 60 secondes comme prouvée. Ne lance pas de nouvelle modification applicative pour ce symptôme sans preuve d'un défaut de Faunosteo. Ma décision J2.3 reste l'option 1 […]. Les tests sur Safari iOS restent à effectuer. Aucune fusion R4 dans develop, aucun démarrage R5, aucune modification de production sans mon autorisation. »

FILE SCOPE

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.

  • 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

  1. J2.3: R4_J2.md expects the application's current branding (the four logos of J2.1) on the export of r3-demo.fr.nologos.pdf; R4_J2_RESULTS.md records the owner's observation as acceptable under that rule, subject to the logos being the current branding, with the original FAIL declaration kept in the note; no file under crates/, packages/, apps/app/src/pdf/, apps/app/tests/fixtures/goldens/, crates/core/tests/oracles/ changed (git diff --stat 1814a8d).

  2. .gitleaks.toml: the allowlist description starts with [gated 2026-10-18]; paths unchanged, no other key added (git diff 1814a8d -- .gitleaks.toml is one line changed).

  3. R4.8 trace: git log --diff-filter=D --name-only --format= 66909b6..HEAD -- '*.test.ts' '*.test.tsx' lists 23 files, all from 0dc1ba2; RUST.md §10.11 states 23 (and that the verifier counted 21), the ledger traces 22 of them case by case (awk -F'\t' 'NR>1{print $1}' crates/core/tests/pdf/LEDGER.tsv | sort -u contains every deleted path but packages/core-wasm/tests/pdf-export.ts-engine.test.ts, which §10.10 names); no file deleted by the diff from 1814a8d.

  4. J1.7 recorded as the owner rectified it: R4_J1_RESULTS.md J1.7 cells for Firefox and Brave read PASS with the picker-delay note, the declared column a PASS with a performance reserve, the note keeps the first FAIL and says the cause of the delay is not established; R4_MINI_RECETTE.md §3 holds M1 PASS ~60 s, M2 PASS ~60 s, M3 NON TESTÉ, M4/M5 NON TESTÉ, M6 NON TESTÉ; no application change for the symptom (criterion 1's path list plus apps/app/src/app/routes/HomeRoute.tsx and apps/app/src/core/** unchanged).

  5. ZenQuality: Footer.tsx has no http image source (grep -n "src=" apps/app/src/components/brand/Footer.tsx), imports @/assets/brand/zenquality-logo-horizontal.png?url; the file is a valid PNG 1024 × 237 whose sha256 is 8625f6b16022494ab376d94d86fa85cd54aa3d5280e3ceb27531ff33538c0f85; components.Footer.test.tsx passes (cd apps/app && ./node_modules/.bin/vitest run tests/unit/components.Footer.test.tsx) and fails when src={zenQualityUrl} is replaced by the old URL (prove by a temporary edit, reverted); DEPLOY.md unchanged; apps/app/src/pdf/branding.ts unchanged.

  6. CSP proof: scripts/browser/r4-app-csp.mjs holds no KNOWN_IMAGE_HOST and treats every document violation, CSP console message and report as a problem; scripts/browser/results/2026-10-21-r4-csp.json has 12 runs, every problems empty, every documentViolations and consoleCsp empty; 2026-10-21-r4-offline-import.json has 6 runs with empty problems.

  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/[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

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.