bchanot
0410af0c35
feat(worker): R1 job loop — claim, download, sandboxed decode, clean upload, commit, purge sweeps
...
Keyed parent on ureq 3 (rustls + ring, bundled roots), no async runtime:
config from the environment (secret never printed, JWT expiry logged), JSON
line logs with a field allowlist (child stderr escaped and truncated), strict
key validation before any URL, Backend trait over PostgREST RPCs and Storage
objects with closed error kinds, one job per claim with the STORAGE.md §3.4
mapping (content codes, processing_error on signals / timeout / overflow,
Broken stops the loop with exit 20, a refused commit deletes nothing), sweeper
(expire pending, purge queue, quarantine leftovers), per-stage watchdog
(exit 21), WORKER_ONCE for tests, run --check extended. 11 loop tests on a
fake backend and decoder; sandbox tests and seccomp derivation unchanged
(the child still makes the same 7 syscalls); image 11.6 MB.
2026-10-13 19:32:38 +02:00
bchanot
926dd7df8c
feat(app): profile photo — avatar upload in Mon compte, photo in the sidebar, drawer and top bar
...
packages/supabase assets module: closed AssetFailure kinds, begin / quarantine
upload (upsert off) / confirm / remove, own-row state read with an explicit
column list, download under the SELECT policy. App: client transport (magic
byte sniff, never SVG, createImageBitmap, canvas 1024 px, JPEG 0.9, 5 MiB
cap), AvatarSection (preview, save, 1 s polling up to 30 s, rejection and
failure messages per closed code, removal with confirmation, in-flight row
resumed at mount), auth store blob URL revoked on change and sign-out,
AvatarCircle in UserBadge and the top bar link to Mon compte (D3), FR/EN
strings, fake client extended, 27 new tests (app 300).
2026-10-13 19:32:37 +02:00
bchanot
614887470c
feat(supabase): files foundation — assets table, private buckets, avatar policies through assets, purge queue, browser and worker RPCs
...
Migration 20261013100000: asset_status enum, public.assets (server-built keys,
lease token, closed rejection reasons), seven private buckets (avatars open with
cap and MIME list, six closed), storage.objects SELECT/INSERT policies for
avatars evaluated through assets, private.object_purge_queue fed by status and
delete triggers (48 h / 1 h grace), storage ceiling, RPCs begin_avatar_upload /
confirm_asset_upload / remove_avatar (authenticated) and claim_avatar_jobs /
complete_avatar_job / reject_avatar_job / mark_quarantine_purged / claim_purges /
ack_purge / claim_quarantine_leftovers / expire_pending_uploads (service_role),
explicit revokes and column grants. pgTAP 010 (125 checks: allowed and denied
twins, policy census, stale lease, supersede, removal, leftovers, cascade,
ceiling), 001 census extended, database.types.ts regenerated from the real
stack, schema-types test counts input arguments only.
2026-10-13 19:32:15 +02:00
bchanot
3f1105bf39
chore(memory): R0 correction delivered — BDR-047, LRN-050, EVAL-018, journal, TODO R0.11 check-offs and CI/CD follow-ups, verify contract
2026-10-13 10:09:49 +02:00
bchanot
496f54990a
fix(ci): types drift gate fails closed on a git error and sees untracked files whatever the git config
...
The ci.yml step assigns git status to a variable before testing it (a git
failure now fails the step, as scripts/check-all.sh already did); both gates
pass --untracked-files=all; the rust-check.sh comment names the real gate.
2026-10-13 10:09:15 +02:00
bchanot
073b25e52b
docs(docs): gate stages (drift, advisories), native exposure note, CI target wording, check:all in WORKSPACE and TEST_STRATEGY
2026-10-13 09:46:07 +02:00
bchanot
e58c7be362
fix(workspace): gate fixes after the security pass — warn-only advisories, drift gate sees new files, PATH guard appends, literal rm path, prctl arguments as unsigned long
...
check-all.sh gains a warn-only cargo deny check advisories stage (no nightly
job runs yet) and the ts-rs drift gate uses git status --porcelain so a new
untracked type file fails too (same in ci.yml); rust-env.sh appends an
absolute ~/.cargo/bin only; wasm-build.sh removes the literal
packages/core-wasm/pkg; the worker passes the unused prctl arguments as
c_ulong and its SAFETY comments no longer claim the kernel checks them.
2026-10-13 09:46:06 +02:00
bchanot
6e2bbec4b0
docs(docs): Ubuntu native development, Docker for services and isolation, separate VPS; pnpm check:all; CI status
...
RUST.md §1 (three environments, native install recipe, what stays in Docker
and why), §4 (pre-merge gate, workflow files prepared and never run), §5.8
(native run numbers against the builder image), §6; CLAUDE.md stack row,
commands, map, workflow rule; README quick start and verification; DEPLOY.md
CI status; WORKSPACE.md; TEST_STRATEGY.md; CHANGELOG; review Annex C.1
addendum of 2026-10-13.
2026-10-13 01:19:15 +02:00
bchanot
981a66f33b
ci: workflows kept as prepared material, marked never executed; script paths under scripts/
...
No runner, secret or registry exists on the forge; the three files map onto
the stages of pnpm check:all so a future runner calls the same scripts.
2026-10-13 01:19:15 +02:00
bchanot
2d573883e5
fix(worker): SAFETY comments state the invariants the code checks; WebP stride by checked arithmetic
...
The [gated <date>] markers read as an approval stamp: replaced by plain
SAFETY comments giving, for each of the seven unsafe sites, the FFI contract
and where the surrounding code establishes it (buffer length and stride
checks, non-zero size and non-null output before from_raw_parts, single
WebPFree, prctl integer arguments with the return code checked, the two
negative hooks compiled with test-hooks only). The stride is now computed
with checked_mul instead of width * 4.
2026-10-13 01:19:14 +02:00
bchanot
f2cf93668e
chore(workspace): native Rust toolchain as the primary path, builder image as the reproducible alternative
...
scripts/rust-check.sh and scripts/wasm-build.sh (moved from docker/) run
natively on the user-level rustup toolchain pinned by rust-toolchain.toml;
scripts/rust-env.sh puts ~/.cargo/bin on PATH for non-interactive shells.
Root scripts: rust:check and wasm:build native, rust:check:docker and
wasm:build:docker through docker/rust-run.sh, check:all = scripts/check-all.sh,
the whole pre-merge gate in one command (rust check, types drift, wasm build,
pnpm check, application image, worker:test, worker:image started read-only).
The native check now runs the worker's unit tests (cargo test --workspace);
the sandbox tests stay feature-gated and Docker-only.
2026-10-13 01:19:13 +02:00
bchanot
bd9c7d1968
chore(memory): R0 closed for owner validation — BDR-046, LRN-049, EVAL-017, journal, TODO R0 check-offs and follow-ups
2026-10-13 00:54:36 +02:00
bchanot
47d84161f5
ci: release-images — advisory gates in a job without secrets, image job runs no third-party code before login, fresh config dir via GITHUB_ENV, run-id builder name, empty digest refused, cleanup order; docs: SAFETY markers consistent, iCCP fixture comment
2026-10-13 00:53:46 +02:00
bchanot
3af2861be7
fix(worker): iCCP-bomb proof asserts the content-rejection property (either content code); docs(docs): RUST.md worker and release workflow wording after the second security pass
2026-10-13 00:37:33 +02:00
bchanot
a8b644a515
fix(worker): second security pass — content-only rejection codes (resource_limit, explicit list), negative proofs of the seccomp argument filters, PR_GET_DUMPABLE self-check, strict WebP chunk structure, iCCP-bomb fixture, separate test target cache; ci: release-images builder actually used (job-level DOCKER_CONFIG, --builder), literal cleanup path, token scoped to the login step, npm advisories gate, digests from build metadata
2026-10-13 00:36:30 +02:00
bchanot
11813f5560
fix(worker): security audit of R0 — no core dumps, tkill/tgkill limited to SIGABRT on self, mmap without PROT_EXEC, Broken outcome for a broken child environment, frame vs canvas check, unsafe denied with local allows, sandbox tests and derivation on the release profile (syscall marker); wasm proof exports behind a feature; ci: release-images hardened (typed input via env, advisories gate, ephemeral builder, env secrets + logout, ref gate, pinned checkout)
2026-10-13 00:18:53 +02:00
bchanot
9d3e0294e2
docs(docs): RUST.md with the R0 proofs, DEPLOY image deploy by digest + CSP note, workspace/test strategy/packages/CLAUDE.md, CHANGELOG; chore(memory): TODO R0
2026-10-13 00:01:27 +02:00
bchanot
4833fd29ef
ci: rust job through the builder image, worker test stage and runtime start, nightly advisories, manual digest-tagged release-images workflow; CSP proof script
2026-10-13 00:01:26 +02:00
bchanot
3970cdca52
feat(worker): sandboxed decode child skeleton — rlimits, traced seccomp allowlist, pure-Rust decoders, libwebp in the child, parent RIFF check, musl image with test stage
2026-10-13 00:01:26 +02:00
bchanot
2a38fa37b5
chore(workspace): Rust workspace R0 — builder image, core crate (JS-compatible JSON, report contracts, facade), wasm facade, core-wasm package with proofs
2026-10-13 00:01:25 +02:00
bchanot
5fec0654d3
Merge chore/step-08-files-analysis into develop
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-12 23:28:08 +02:00
bchanot
40d416b497
docs(docs): Rust review Annex C — owner validation and amendments (D-R4, D-R5, D-R9, D-R13), R0 go; chore(memory): BDR-045
2026-10-12 23:28:07 +02:00
bchanot
51667788e5
docs(docs): Rust review annexes — expanded decision table D-R1..D-R14 and R0 scope (Docker builder toolchain, 7 experimental proofs); chore(memory): BDR-044 orientation validated, journal, TODO R0
2026-10-12 22:58:09 +02:00
bchanot
3fbf34f663
docs(docs): Rust review rev 2 — 61 challenger findings folded (3 crates, frozen oracles, consumer-driven deletion, keyless parent, CSP/digest deploy); CLAUDE.md Rust-by-default rule; chore(memory): BDR-043, LRN-048, EVAL-016, journal, TODO Rust roadmap
2026-10-12 22:48:48 +02:00
bchanot
6a078dab74
docs(docs): Rust-by-default architecture review rev 1 — inventory, hidden contracts, A/B/C classification, Rust worker, workspace, roadmap R0–R6, 14 owner decisions
2026-10-12 22:21:49 +02:00
bchanot
aae0b392f8
docs(docs): Step 8 analysis rev 2 — 47 challenger findings folded (keyless decode child, write order, purge queue + grace, download under RLS, narrowed schema); chore(memory): TODO 8.x
2026-10-12 01:29:57 +02:00
bchanot
5e067a02ad
chore(memory): TODO Step 8 plan skeleton + release 0.2.0 deploy check, journal
2026-10-12 01:12:21 +02:00
bchanot
54df4d851a
docs(docs): Step 8 files foundation analysis — storage model, worker, quarantine, policies, backups, scope
2026-10-12 01:11:28 +02:00
bchanot
505b83087b
Merge feature/step-07-identity-app-shell into develop
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-12 00:54:05 +02:00
bchanot
3cf74fd255
docs(docs): validated Step 7 mockups under docs/design (reference README with deltas and owning steps); chore(memory): BDR-042, journal, TODO 7.10 follow-ups — Step 7 validated
2026-10-12 00:54:03 +02:00
bchanot
9d2fb788c1
chore(memory): EVAL-015, journal, TODO 7.9 — Step 7 gates closed, awaiting user validation
2026-10-11 23:47:18 +02:00
bchanot
9771d997f4
fix(app): failed sign-out reported (local session still cleared); reauthentication_needed phrased; docs(docs): exact production redirect allowlist
2026-10-11 23:45:14 +02:00
bchanot
1aed64b4ef
fix(app): safeNextPath resolves next= against a sentinel origin (closes the /\host and tab/newline open redirect); tests; contract amended
2026-10-11 23:44:00 +02:00
bchanot
aeea1f2e9b
chore(app): drawer honours prefers-reduced-motion; chore(memory): BDR-041, LRN-047, journal, TODO 7.x
2026-10-11 23:40:11 +02:00
bchanot
552733b4c8
docs(docs): IDENTITY.md (routes, session, providers, MFA gap, manual validation); CLAUDE.md map + architecture; SUPABASE.md wiring; CHANGELOG; plan note; Step 7 verify contract
2026-10-11 23:39:08 +02:00
bchanot
aa1985eead
test(app): identity step — auth store, locale sync, login/signup, guards, shell, dashboard, account
...
- tests/helpers/fakeSupabase: in-memory auth events + profiles/profile_roles builder
- validation schemas and safeNextPath; classifyAuthError mapping (packages/supabase)
- LoginRoute (unavailable, validation, next path, phrased failure, OAuth buttons, show password)
- SignupRoute (policy, mismatch, metadata + redirect, user exists)
- RequireAuth / RedirectIfSignedIn, AppLayout (nav, active, drawer, sign out), Dashboard, Account forms
2026-10-11 23:33:25 +02:00
bchanot
c517ea267b
feat(app): identity screens and /app shell — auth store, login/signup/reset flows, dashboard, account
...
- state/authStore: session subscription (initialize + onAuthStateChange), profile + roles load, recovery flag, URL failure; services/localeSync: profiles.locale <-> localeStore
- routes: /login, /signup, /forgot-password, /reset-password, /auth/callback; guards RequireAuth (next=) and RedirectIfSignedIn; /app (dashboard), /app/account behind the guard
- shell: AppLayout (desktop sidebar, light top bar, mobile drawer), SidebarNav, UserBadge, SignOutButton
- account: personal / professional / preferences / security sections, one save each, Zod validation with i18n keys
- ui: Icon, FormField, Notice, ButtonLink (buttonClassName shared), PasswordField, OAuthButtons (config-driven)
- Home header: Mon espace / Se connecter when Supabase is configured; local tool routes untouched
- i18n: auth.*, shell.*, dashboard.*, account.*, home.space.* in fr + en
2026-10-11 23:29:13 +02:00
bchanot
0f7292f9b3
test(config): authProviders parsing; fixture carries the new field
2026-10-11 23:16:57 +02:00
bchanot
b10b227ee9
feat(supabase): auth, profile and roles services; professional columns on profiles; OAuth + TOTP config
...
- packages/supabase: signIn/signUp/OAuth/reset/updatePassword/signOut wrappers with a closed AuthFailure kind, fetch/update own profile, own platform roles
- migration 20261011100000: practice_name, professional_title, siret (format-checked, column grants); pgTAP 009; database.types regenerated
- config.toml: TOTP enroll/verify on, [auth.external.google|apple] via env(), wildcard redirect URLs
- app config: authProviders (APP_AUTH_PROVIDERS / VITE_AUTH_PROVIDERS), entrypoint env.js, DEPLOY table
- TODO: Step 7 plan
2026-10-11 23:16:13 +02:00
bchanot
c746952d7f
Merge feature/step-06-pdf-archives into develop
ci / check (push) Canceled after 0s
ci / docker (push) Canceled after 0s
ci / supabase (push) Canceled after 0s
2026-10-11 17:32:15 +02:00
bchanot
62b2b9d86a
fix(pdf): candidates sorted by data offset, JSON depth pre-scan before parse, budget wording; chore(memory): BLK-009 mitigated with gate, EVAL-014, journal, TODO, CLAUDE.md import notes
2026-10-11 17:31:07 +02:00
bchanot
3a6e92625a
fix(pdf): inflater fed in 16 KiB slices (browser memory bound), shared 16 MiB candidate budget, monotonic bounded endstream search, JSON object pre-check
2026-10-11 17:08:56 +02:00
bchanot
6adc38b027
docs: hardening §4 commit pointer
2026-10-11 16:42:46 +02:00
bchanot
60ee71208f
fix(pdf): bounded attachment extraction by byte scan — no pdf-lib parse on import, export without object streams (BLK-009)
2026-10-11 16:42:45 +02:00
bchanot
62b8a43e09
feat(home): import messages open with a full-restoration or partial-recovery headline; BDR-040 recorded
2026-10-11 16:31:37 +02:00
bchanot
de2bd0437e
chore(memory): BLK-009 attachment scan contract
2026-10-11 16:29:15 +02:00
bchanot
6688c3c60e
chore(memory): journal + TODO 6.8 after the first manual-test round
2026-10-11 16:16:14 +02:00
bchanot
e8f1734424
feat(editor): tell the practitioner when a restored draft was rebased on a different sheet
2026-10-11 16:15:13 +02:00
bchanot
5ed4a4b620
docs: PDF import hardening analysis (BLK-009) — byte-scan reader and object-stream-free export now, worker and parser replacement before external users
2026-10-11 16:12:22 +02:00
bchanot
293a6e0b36
fix(pdf): bundle the branding assets into the app (no fetch at export), export returns its warnings and the editor reports missing elements
2026-10-11 16:09:39 +02:00