v1 slice 1: record_lesson and lesson_status, stored as written (walking skeleton) #13
Loading…
Reference in a new issue
No description provided.
Delete branch "uranus/4-walking-skeleton"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (feature): a member can record a lesson and read its state, end to end on the mesh, with no model configured.
Range 266b15a8..596b3ffe, one commit. The design is #1; the four-app shape follows mcl-agora.
Done when (#4)
stored, found byanswer_querya_clean_lesson_is_stored_and_found_by_answer_queryrefusednaming it; mcl-rag holds nothing. Mutant of the scana_leaking_lesson_is_refused_by_name_and_rag_holds_nothing; mutant "filer: the scan is run" killed by it, plus the leak_scan_tests mutantsrecord_lessonanswers before the worker runs (worker held)record_answers_before_the_filer_runs: the filer is held, gets its turn (file), files nothinga_restart_keeps_every_lesson_and_staterag_stand_inis the filer's sink; responders are called directly; the store lives under_buildProof
rebar3 eunit: 42/42. lint, xref and dialyzer clean. OTP 28.4.3.hold: there were two guards in series (kickandfile_head). There is now one, infile_head, which also covers a timer already in flight. The test now fires the filer's turn while it is held.skip a lesson already final:rag_stand_inwas abag, so a second{call, Id}was never counted. That also blinded the restart test's "filed once" lines. Now aduplicate_bag, and there is a test that hands the filer a stored and a refused lesson again.an unreadable stream waits: a test hands the filer a minted, never-dispatched id (its stream reads empty); it stays at the head.scripts/c4_model.sh) on this branch:--design .rc=0 and.rc=0. It is silent on a pass, so I checked that it ran: on a copy with the component link removed, the full run failsassets/c4-component.svg is not shown by README.md architecture/README.md, rc=1; with the context link removed too,--designfails the same way forc4-context.svg, rc=1.Release needs (at tag time, not now)
build-push.ymlneeds theimage-buildrunner, varsBUILDKIT_ENDPOINT,FORGE_PACKAGES_USER, and secretsFORGE_PACKAGES_TOKEN,COSIGN_PRIVATE_KEY,COSIGN_PASSWORDon this repo.Refs #4
An mcl_om_service OTP 28 release in the four-app shape: mcl_scribe (the service and its reckon-db store, the scribe log), guide_lessons (the lesson aggregate, the filer and the leak scan), project_lessons (the read model) and query_lessons (lesson_status). - record_lesson appends the lesson as written and answers {lesson_id, queued} at once; an empty or oversized lesson is refused at the door. - The filer takes queued lessons in log order, one at a time. It reads the lesson's own stream before filing, so a lesson already final is never filed again; a head it cannot file now waits after a doubling retry, and nothing is dropped. - The leak scan reads the operator's rules file for every lesson: whole terms, any case. It fails closed: no readable rules, nothing stored, /health says why. - A lesson that passes goes to mcl-rag add_knowledge and reads stored; one that does not reads refused, naming what it carries. - lesson_status reads queued, stored or refused (with the reason). - Both procedures: the realm's members only, sealed calls only. - A restart replays the log: every lesson and state is kept. - One OCI image, deploy/docker-compose.yml, forge CI (tests on every PR and push to main; a v* tag builds, pushes and signs the image), the C4 component diagram, README "Run it on your own hardware", CHANGELOG 0.1.0. Tests use local stand-ins for mcl-rag and the mesh: nothing reaches an outside service. 42 eunit tests, 15 mutants each killed by its own test. Refs #4F1: the scan matched a term's edges on bytes, so a name next to a curly quote, a curly apostrophe or an em dash scanned clean, and a path rule written with its trailing slash never matched. The scan is now a literal pattern in Unicode caseless mode, with a word-edge check on code points (\p{L}, \p{N}) on each side where the term itself has a letter or digit. A path rule's trailing slashes are dropped, so it names the directory and everything under it. F2: a lesson that was not UTF-8 crashed the scan at the filer's head, on every boot. record_lesson refuses it at the door (text_not_utf8). A rules file that is not UTF-8 is refused whole. Mars ruling 2026-11-25: zero rules is degraded, on the same path as an unreadable file. The lesson stays queued, the filer holds, /health reads degraded with no_rules, and the README says so. Red first: 15 new tests failed before the fix. 57 eunit tests pass, and each new guard has a mutant killed by its own test. Refs #4Landed by hand as
302381dea5(--no-ff, gated).Pull request closed