Repository navigation
feat(cli): MVP-8 — the Home as hub: run a workflow, answer gates, browse and manage from the Home (ADR-0139, 0140) - #102
Merged
Merged
Conversation
…e merge checkpoint, the status documents and the register brought up to date PR #101 was merged on 2026-11-21 as 0a599a3 (parents 1e71f65 and 9e77ff0; the tree is identical to the final head's, so development was fast-forwarded). The new "PR #101 merge checkpoint" in the Phase 2.6 record states what the PR carried, the final-head evidence (all 29 CI jobs green before the merge; the SonarCloud gate red on 60b6595 and OK on 9e77ff0) and what it does not show (the Windows runbook rows 1-16 on real terminals, the Sonar analysis and the merge commit's CI run on main, the registered lows). current.md, CLAUDE.md, AGENTS.md, README.md and the register's header say MVP-4 is complete and MVP-8 is next; the Sonar fix is a row in the review-corrections table. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d become named helpers, with no change of behaviour (cleanup) Twenty-eight nested ternaries (S3358), seven cognitive-complexity findings (S3776), two index keys (S6479) and one optional-chain suggestion (S6582) in the approval card, the permissions sheet, the grant store, the chat store, the Home and chat hints, the revoke command and the secret-range reader are extracted into small named functions. The one rule is that nothing observable changes: every user-visible string literal is identical (checked per file against 0a599a3), and the extractions keep the order of every check. Evidence before review: the 325 test files around the touched code pass; a differential harness (not committed) compared the baseline and the new code over about 300,000 seeded inputs (the card's key rows over the whole grid, the card's warnings, the facts and program names, the permissions sheet's key fold and lines, the grant store over random histories of writes, revocations, damaged lines, renewals, marks, bounds and a lost key, and secretShapedRanges over random credential-shaped text); a mutation sweep of 16 mutants of the new code was killed after the harness was widened where four survived; the full local gate passed (24 steps, 30 minutes). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… fail under their mutants (review) The independent test-adequacy review of c27a350 ran about 200 mutants against the extracted helpers and found words and branches no test pinned. Each now has a test, and each test was run against the mutants the review named: - documentCache: a deep-frozen command preview keeps the strict, the command and the ordinary document apart (every older test preview was unfrozen, so the cache was bypassed and a collision would have shown Allow with no mask required). - commandRowsOfferNote, cardTitleRows, reviewUnavailableText (and its call-site arguments, through the host), rowLine's armed flag, rowSpans's narrow-row guard, rowTarget, homeHint, idleHint, the two unreadable-file reasons, and the plain denial of an ordinary call whose review cannot be drawn. cardTitleRows, reviewUnavailableText and idleHint are exported for their tests, as keyTone already was. A return type (legendItems) and three stale doc comments are corrected. No behaviour changes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…lse positives marked, 38 smells refactored, the review and its tests recorded Records main's merge-commit CI (29 of 29) and Sonar gate (OK, 886 open), the 149 false positives marked, the 38 smells PR #101's lines introduced and how they were verified (differential harness, mutation sweep, four reviews including a security sitting, the adequacy review's tests, the full local gate), and what stays open on purpose. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d inside the Home) and ADR-0140 (management browsers, the run drill-down and the durable run detail) proposed, the review recorded, the five-step plan written The documents MVP-8 rests on were reviewed against the code. Stale register entries are struck with their evidence (the content-level identity guard and the chat persister's turn atomicity are done; the gate-resolve window is re-scoped to a proving test; run-submission idempotency is rescheduled to step 3), current.md's MVP sentence, scope and carry-in text are corrected (a workflow run is unattended and shows no approval card; a run parked at a gate has no cancel), and the phase record gains the pre-flight review, the maintainer's four rulings of 2026-11-22 and the plan. Both ADRs are Proposed for the maintainer's acceptance. The dated notes on the ADRs they amend are written on acceptance. Refs: ADR-0122 §10, ADR-0115, ADR-0137 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ndings fixed, both ADRs still Proposed Two independent reviews were checked against the code and the cited documents before any change. Confirmed and fixed: the amendment notes described as written (they are written on acceptance); the consent card's Esc and Ctrl+C contradicting the card rule (now a start card, refusal by default); the run view's Ctrl+C contradicting the overlay rule (two presses while a leg executes); PRAGMA data_version not seeing the same connection's writes (the poll and the strip also use the in-process generation); driveRun's RunLifetime enumerated in full; the lease rule of ADR-0079 §4 for every re-pause; the tail cursor advancing over skipped rows; listRuns selecting every column (new summary reads with a plan test); agent:tool_call having no call id (toolActivity is content-free and paired first-in-first-out); node cost falling back to the boundary and reporting "not recorded" rather than 0; the workflow pin keyed by project and slug; one rule per /permissions entry point; the models pricing form generated from the shell's field table; the import, export and pricing cores split into prepare and commit; the overdue gate, secret field and launch form given interrupt behaviour; an alternatives section; the secret-input premise corrected (the shell takes secrets from stdin); a chat and a leg allowed together. Partly right and kept as a stated fallback: the media-only park. Status stays Proposed: acceptance is the maintainer's decision. Refs: ADR-0139, ADR-0140, ADR-0079 §4, ADR-0115 §1 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…on the nine ADRs they amend The maintainer accepted both ADRs on 2026-11-22 after the review round recorded in the phase register. ADR-0139 (a workflow run is hosted inside the Home) amends ADR-0115 and ADR-0122 §10; ADR-0140 (management browsers, the run drill-down and the durable run detail) amends ADR-0036 additively and ADR-0137 §3. Dated notes are written on the ADRs they touch: 0036, 0054, 0079, 0097, 0103, 0115, 0118, 0122 and 0137. The README index, the phase record and current.md now state Accepted. Refs: ADR-0139, ADR-0140 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…ity (ADR-0140 §4, MVP-8 step 1)
node:completed and node:failed gain two optional, additive fields: toolActivity (at most 50 entries of
{ toolId, ok, durationMs? }) and toolActivityTruncated (the calls beyond them). The engine fills them from the
agent:tool_call and agent:tool_result events it already delivers, through an in-process tracker that pairs each
result with the oldest unpaired call of the same node and tool (the events carry no call id) and resets per
attempt. node:retrying carries nothing. Nothing is persisted from the bus events themselves, no arguments and
no result text are kept, and older binaries ignore the fields (their schemas are not strict).
Refs: ADR-0140 §4, ADR-0036 (2026-11-22 note), ADR-0075
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… and the summary reads the Home's browsers need (ADR-0140 §2, §4, §5; MVP-8 step 1) Adds the run_pins table (kind, project_root, ref; the Home's global, capped pin list) and the partial index idx_runs_project_created on runs(project_root, created_at DESC, id DESC) WHERE deleted_at IS NULL. The additive migration is hand-checked: one CREATE TABLE and one CREATE INDEX, no table rebuild. Adds the reader contracts the browsers read through, each additive and bounded: listRunSummaries (keyset page, no blob column), loadRunDetail, listStepSummaries, loadStepDetail, loadRunEventsAfter (a tail that advances its cursor over rows a newer binary wrote), loadRunLeases (primary key, capped), and loadLatestRunPerWorkflowInProject. The existing listRuns, loadStepExecutions, loadLatestRunPerWorkflow and their callers are unchanged. createRunPinStore: pinItem with a 50-row cap checked inside BEGIN IMMEDIATE, unpinItem, listPins; the ref and project key are validated. applyDerived's default arm is now assertNever over the RunEvent union, so a new event type fails to compile until it has an arm. Plan tests pin the index use of the new reads; the database schema reference lists the columns no writer ever sets. Refs: ADR-0140 §2, §4, §5; ADR-0074 §5; ADR-0075 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… the live tail of a run (ADR-0140 §7; MVP-8 step 1) --failed prints only the events that carry a failure (node:failed, node:retrying, run:failed) and the run's closing terminal event. --follow prints the existing log, then keeps reading new durable events through the tail read, one batch at a time with a fixed 500 ms interval, and ends with exit 0 when the run reaches a terminal state or parks at a gate that names a gate (a media-only park keeps following). The gate notice names the answer command and goes to stderr under --json, so stdout stays a pure NDJSON stream. Both flags are additive: with neither, the plain output is pinned byte-identical by a test. The tail cursor moves over the rows a newer binary wrote, so a skipped tail is not re-read on every poll. The wait honours the command's own signal and admission checks, as init does. Refs: ADR-0140 §7, ADR-0049, ADR-0110, ADR-0139 §6 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…he Active tab and the History tab (ADR-0140 §2, §6; MVP-8 step 1) Four pure models over the reads of step 1, with no I/O, no clock and no ink: - run-detail: the header, one row per node in execution order with its last attempt, attempt count and the cost it can honestly state (attempt rows, else the boundary, else "not recorded", never 0), the unattributed remainder, the first node whose last attempt failed, and the node's tool trace from its last terminal event. - node-detail: the attempts, the models actually used, the sanitized error, a bounded output preview (40 lines, 4000 code points, every secret-shaped leaf masked before the cap), the timeline and the tool trace. - active: the Active tab's classes (hosted, other running, paused here, paused elsewhere, held in the outbox, paused with no gate count read), the stalled rule at the exact lease boundary, and the ordering. - history: the rows, the status filter and the keyset cursor taken from the raw page before filtering. The gate-versus-media question is not guessed: a paused run is actionable only when the caller supplies its pending gate count, and step 3 must fill that map. The output preview is a floor; step 3 replaces it with the final-summary masking core, exported for reuse. Refs: ADR-0140 §2, §4, §6; ADR-0104; ADR-0122 §7 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… columns for the project overlay, refused over-cap limits, stricter pin writes, and the proofs the review asked for (MVP-8 step 1) The project-scoped latest-run read selected every run column (including the snapshot and the JSON blobs) through its window; it now selects the summary columns, as ADR-0140 §4 requires for list reads, with plan tests for it and for loadRunDetail in the db package. listRunSummaries refuses a limit above 200 instead of clamping it, matching loadRunLeases. Pin writes also refuse Unicode format characters and lone surrogates, which could not be listed and unpinned by the text shown; unpin matches the exact stored key so a crafted row can still be removed. The status and workflow filters get tie-paging regression tests at page sizes 1, 2 and 3. The pin cap is proved to take the write lock first (BEGIN IMMEDIATE) with a two-connection test. The schema reference states that trigger_type is written (always 'manual') and corrects the never-written list, column by column. Refs: ADR-0140 §4, §5 (amendment note of 2026-11-22) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… bounded registry-only tool id, and an empty trace on every terminal (MVP-8 step 1) The duration was the gap between two synchronous emits, about zero: agent-turn now reads the engine's elapsed clock around the registry dispatch and carries the measured durationMs on the successful agent:tool_result. A missing or non-finite reading yields no duration and never fails the dispatch; the tracker stores what it is given. A tool id that the registry does not know is recorded as the fixed unknown_tool, on both the call and the result, and the recorded id is bounded (128 characters, a fixed character set) in the schema and in the tracker, so a model-chosen name is no longer stored verbatim. The live row still shows the model's text in the reason, as before. Every node:completed and node:failed carries toolActivity, an empty array when the node made no tool call, so an absent field means an older log and an empty array means no tool calls. The reference now states exactly that, the measured duration, the id bound and that a fatal tool failure shows as no result recorded. Refs: ADR-0140 §4, ADR-0075, ADR-0132 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…ounded output preview, the owner check that ends a follow, sanitized labels, and the proofs the review asked for (MVP-8 step 1) The output preview refuses a stored output above 1 MiB before parsing it (the engine's own bound is 256 KiB), and its walk stops at the line and character cap, so its cost follows the preview and not the document. Object keys are cut before scrubbing. The cached-token count is no longer shown (the column is never written). Run and node views distinguish an older log (no toolActivity field) from a node with no tool calls (an empty array). logs --follow ends with a stderr note when the run has no live owner or no row, checked at most once per second of injected time, so a run whose process died no longer keeps the command polling. A live lease keeps following, and a gate park is never judged by its lease. projectRoot and the short id are sanitized in every model that shows them. The dispatch path is tested for both flags, and readHistory no longer spreads an unbounded array. Refs: ADR-0140 §2, §6, §7; ADR-0122 §7; ADR-0049 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…h joiners in names, the proofs the review asked for, and the workflow plan (MVP-8 step 1) A pin ref or project root may now contain U+200C and U+200D, which occur in Persian, Indic and emoji-sequence directory names; every other format character, the bidi controls and the lone surrogates stay refused on write. Tests pin the boundary cases the review found untested: pinned-at zero, a negative time, a write-path root over the bound, and the workflow-only plan of the run listing (its first and keyset pages), which the reference states. Refs: ADR-0140 §4, §5 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…d when it starts, and the three outcomes are told apart (MVP-8 step 1) A call in flight when its node was cut by a deadline or abandoned was dropped from the trace, so the terminal read as "no tool calls" while a call had run. The turn now announces each attempted call before any decision, through an optional start hook, and the engine records it then; the bus event agent:tool_call keeps its emit position and content. A call started and never answered is an unpaired entry. The entry gains a required resultRecorded flag, so the three outcomes are distinct: a refusal (resultRecorded true, ok false, no duration), a failed dispatch that ran and was measured (ok false with a duration), and an unpaired call (resultRecorded false). A failed dispatch that ran is measured with the same no-guessing rule as a success. The re-dispatch of a node after an earlier attempt was cut is pinned by a test. Refs: ADR-0140 §4, ADR-0075 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…the three toolActivity outcomes and the call that starts before its result Refs: ADR-0140 §4, ADR-0036 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… three tool outcomes, the token rule, the sinks and the follow's last read (MVP-8 step 1) A tool row now says what happened: refused, failed after a measured time, or no result recorded because the node ended first. A node's tokens are the sum of its settled attempts (the rows that give its cost), else the completed step's, else "not recorded". The run header sums every settled row when any exist. The tool trace of a node page is the requested attempt's, never another attempt's. The output preview masks a member whose name is a credential, as the final summary does (the two helpers are now exported, with no change of behaviour for the summary). Text is scrubbed whole and then clipped, so a cut cannot leave a secret prefix; an error record above 1 MiB is refused before it is parsed; the timeline's code, reason, decision, gate type and modality are scrubbed as well. logs --follow reads once more after deciding that the run has no live owner or has gone, so the closing event that was committed at that moment is printed. A run is stalled only when it is older than one lease TTL and its lease is missing or expired, as the reconcile rule has it, so a fresh run without a lease is not reported. Refs: ADR-0140 §2, §6, §7; ADR-0122 §7; ADR-0079 (2026-11-06 amendment) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…ield's name, where the plans are pinned, the stalled and follow grace Refs: ADR-0140 §2, §4, §7; ADR-0079 (2026-11-06) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…d no longer read past the bound; inputJson is not read at all; pin escapes are written as code points (MVP-8 step 1) loadRunDetail and loadStepDetail read their output and error documents only when their byte length is within one MiB, judged in SQL on the blob's bytes. Above the bound the record carries the byte length and no text, so a caller refuses without the document entering memory. inputJson is removed from the run detail: no consumer reads it, and it is secret-adjacent (ADR-0113). The pin validation's joiner allowance is written as escapes, not raw characters. Refs: ADR-0140 §2, §4, §5; ADR-0113 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…the absence texts, the sinks and the proofs (MVP-8 step 1) logs --follow judges a run owner-less only one full lease TTL after its expiry, and an absent lease only for a run older than one TTL, as the reconcile rule has it; a late event read after a verdict keeps the follow going. The gate notice is printed one command per row, with the budget label and its excluded notes, as status prints it. The no-owner and gone-run notes are shortened and stated in the reference. --failed says so when a run closed with nothing failed. The history models say what is absent in plain words: did not run for a skipped node, did not finish for a node the run ended before, in progress while it runs, and not recorded only for a completed or failed row whose data is truly gone. An oversized stored document is named with its byte count. Labels and project roots are bounded and scrubbed. Refs: ADR-0140 §2, §4, §6, §7; ADR-0079 (2026-11-06) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… delivers, the three review rounds, the deviations and the obligations carried into steps 3 and 4 Refs: ADR-0140 §§2, 4, 5, 7 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…, and the scrub of a long value is bounded and says what it is (MVP-8 step 1) A row a foreign writer stored with an over-length ref was listed and counted toward the cap, but unpin refused its own listed key, so it held a slot for good. unpin now checks only the kind and the types: the key is a bound parameter that matches the exact row. A test pins that the over-length row is removed, and the mutant that reinstates the check fails it. scrubbedBounded cut its input only by a comment's promise that the caller gated it. It now cuts the input to a fixed 65,536 code units before scrubbing, which bounds the work for any caller, and no displayed window is larger than that. Refs: ADR-0050, ADR-0140 §4, §5, ADR-0122 §7.5 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…o obligations it adds for the Home's pin wiring Refs: ADR-0140 §5, ADR-0050 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… length judgement on unpin) (MVP-8 step 1) Refs: ADR-0140 §5 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…epeat denial, a half-failed clock gives no duration, and the attributed id cannot carry the error's raw text (MVP-8 step 1) Refs: ADR-0140 §4 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…e page caps before it scrubs, duplicate attempt rows collapse, a future clock is named, the follow's lease rule is strict, and the notes and the register say so (MVP-8 step 1) A value above the scrub bound is shown as a fixed sentence, never as a cut: a cut before the scrub could leave a secret's recognisable prefix in the window. The node page caps its model names and timeline before it scrubs or builds them. A re-dispatched node's two step rows for one attempt collapse to the last, so an attempt is listed once and its tokens are not doubled. A timestamp more than a minute ahead reads as in the future, not as now. The follow's no-owner verdict is strictly after one TTL past the lease's expiry, as the Active tab's stalled rule is. The follow's help and reference name all three stops. The register records the lows left open, and two correction notes amend ADR-0036 and ADR-0140. Refs: ADR-0140 §2, §4, §6, §7; ADR-0079 (2026-11-06); ADR-0036 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… owed Refs: ADR-0140 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
… test pins it — the last of the round-five lows (MVP-8 step 1) A re-dispatched node can leave two step rows for one (run, node, attempt). The detail read now returns the most recently inserted one, by rowid, instead of whichever the index returns first; a test inserts two such rows and fails under the ascending order. Refs: ADR-0140 §2 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…uns, the unattributed cost carries its coverage, the two surviving mutants are pinned, the young-run wording is exact, and the register and the record are corrected (MVP-8 step 1) A run that has not finished with no settled rows reads in progress in the header; a finished one reads not recorded. The unattributed cost is qualified like the header's cost. A test pins the step rows that the node and run cost read under one attempt, which two mutants had escaped. The follow's young-run sentence says 60 s or more ahead on the future side in the reference, the code, and a test title. The register gains the three lows left open with their triggers, and the implementation record drops two statements that did not match the code. Refs: ADR-0140 §2, §6, §7; ADR-0079 (2026-11-06) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…s target, replaces a plain file atomically, and the operator home is handed in, never defaulted (PR #102 review: P0-1, H2, P05-2, P05-5, T05-1) import, create, export and the Home's two commits now look at the final path component without following it (lstat) before an overwrite: a link, FIFO, socket or device is refused with a fixed sentence and nothing is written; a plain file is replaced through a fresh temporary and a rename, which never follows a link, and keeps its mode. The in-chat export shares the look. assertProjectArtifactPath and resolveProjectDirectory no longer default to the OS home. The Home's export commit re-checks the target, success lines are sanitized, and an authored file that is not valid UTF-8 is refused instead of repaired. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…at cannot be stored is refused, never stored as free; the sentence prints the stored value; the shell reads the database catalog; the characterisation test can no longer skip its oracle (PR #102 review: U06-1, H4, P1-12) Math.round(usd * 1e8) stored 4e-9 as 0, and the cost path believes a stated 0, so a positive price could disable the cap for its model. The text is now parsed digit by digit into whole micro-cents (no float multiplication), a price below the smallest step or with more than eight decimals is refused with a fixed sentence, hex/binary/octal are refused, and every line prints what was stored. The model-id rule (empty, invisible, padded) is one function shared by the shell and the Home form. CHARACTERIZE_DUMP no longer makes every case return before asserting. pricing-card's runPricingCard is split to satisfy cognitive complexity. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ad, show the pin of a foreign run, read the Active list as one snapshot, and no longer loop or throw on a bad cursor (PR #102 review: H5, H6, P1-6, and the browser rows) An Active run that leaves the list no longer hands Enter to its neighbour; a History page with no finished run says that the next page is one key away; the Defined tab says honestly that it has no workflow detail yet; an unreadable log keeps the run's own status; the agents list builds a prompt's detail only when it is opened; chunksOf refuses a non-positive size and a full page with an unparsable createdAt ends the read instead of throwing; one shared usage accumulator replaces two copies; the tab legend names Ctrl+C when it fits. The snapshot reader is wired in a following commit with the Home's wiring. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e confirmation names the file scope and what the run may do and the start binds that scope, and hosted-run notices carry no absolute path (PR #102 review: H-1/P1-4, P1-7, P1-13, H1, and the launch rows) A cancel during 'Starting the run…' used to be swallowed: the engine build and an approved MCP server's connect ran on, and a consent card read the cancel as 'not approved'. The start now takes the flow's signal and stops the leg's lifetime. The confirmation gains one bounded sentence from the digest-bound definition (file scope and where it came from, commands, writes, MCP servers) and the start refuses if [defaults].fs_scope changed after the Yes. RunHost.homeDir is required, hosted-run faults go through faultForTranscript, the MCP consent card scrubs server-authored text like the run card, a run id is offered as a copyable command only when it is shell-inert, /run while a leg executes is refused before the form opens, and the leg's cleanup tail is guarded step by step. Cognitive complexity of the launch reducer, the native prompt router and prepareRun is reduced with the existing tests unchanged. Also wires the Active reader's snapshot option. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rite is pinned to the directory it was confined to, a replaced file keeps its group, and the operator home is handed to init (security sitting of 75c87a4: M1, L1, L2, L3) The independent sitting probed the in-chat export's check-then-open-by-path window (the victim was overwritten 169 times in 85,606 tries) and a parent directory swapped after the confinement. The forced replace is now one shared module, process/forced-write.ts: look without following, write a fresh temporary and rename it over a plain file, otherwise create exclusively and look again. The write goes through the canonical directory and refuses, with a fixed sentence, if that directory stops resolving to itself between steps. The replacement keeps the old file's group, or falls back to owner-only bits. import, create and the Home's commit refuse an id that is a Windows device name. prepareProjectInit requires its home. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…esult that succeeded or took time, the unresolved-effects message names at most twenty, the step and tail reads are bounded, and the gate race is tested interleaved (PR #102 review) The schema now refuses the two impossible unpaired entries (ok:true, or a duration) and the doc comment says which refusals a workflow node can reach. A crashed run with 20,000 unresolved effects produced a 1.2 MB error message the run-detail read would then refuse: the list is capped at twenty names and a count of the rest, at both places that build it. listStepSummaries takes a LIMIT and the tail read stops after a scan cap, with the cursor the caller continues from. Two barrier-held interleavings show that of two engines resolving one gate exactly one decides and the other ends fenced. The merged switch cases keep their comment above the group so no-fallthrough is satisfied. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… cut never splits a character, an empty output says so, a wrapped table keeps its non-breaking spaces, and the highlighters charge every lookahead they make (PR #102 review: P1-14, P09-1, ADR-0144) The member-name rule is exact (apiKey, api_key, password, secret, authorization, token and their spelled variants; key, tokens, max_tokens and the like stay visible) and only ever adds masks: a marker oracle over 400 documents shows every leaf the old rule hid is still hidden. A listed name masks a string or a number, never a boolean or null, so the engine's masked-input marker is left alone. The cut backs off a surrogate pair; an empty value prints (empty); NBSP and the ideographic space are no longer dropped at a wrap. The CSS, YAML and TOML lookaheads now charge the work they read, so a block built to make each one scan far is shown plain, and the wall-clock assertion in the invariant test is replaced by a step count. Cognitive complexity of the six highlighters is reduced with the existing tests unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd appended through one descriptor, a YAML mapping has a key budget, malformed UTF-8 is refused, and a notice is bounded before it is wrapped (PR #102 review: M-E1, M-E2, P1-15, P05-2) The config loader opens once (non-blocking, links followed as ADR-0063 keeps them) and asks the descriptor for regular-file, size and bytes, so a file renamed over the path after the open is not the one parsed, and the 0600 self-heal never chmods through a link. The MCP consent log and the terminal outbox refuse a link, a FIFO and an oversize file on read (an outbox link used to be parsed as terminal events) and append through appendToOwnerOnlyFile: one open with O_NOFOLLOW, fstat, then the write and the fchmod on that descriptor. The consent warnings name ~/.relavium/mcp-consent.ndjson, not the absolute path. decodeHardenedYaml refuses a mapping past 100,000 keys with a fixed error before it builds one library error per key (a hostile 2 MiB block map: 575 MB and 1.95 s before, 273 MB and 1.16 s after); a scan-level total is still a maintainer decision. The catalog and run reads decode strictly, and a 2 MiB notice is clipped before it is sanitized and wrapped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… a run that parks or ends behind a chat leaves a transcript note, the Attention row names its workflow and deadline, the typed and pasted line agree, and a cancel reaches the resume paths (PR #102 review: P1-3, P1-5, and the Home rows) The card gives the message the rows the terminal leaves (four at least, twelve at most) and, when it still cuts, ends the last row with an ellipsis and prints 'relavium gate list <run id>' outside the gutter; an input gate wraps its command and says rejecting continues the run. A hosted leg that parks, completes or fails while a chat is in front leaves one identity-keyed note in the chat. The parked row carries the workflow and the earliest deadline (overdue in red). The swallowed Enter after a focus drop is set only by a read of what another terminal changed, and the Active poll pauses while a native question is open. A leg with no run id is never a view's leg, so a second Ctrl+C cannot cancel the wrong one; the run view below 80x24 names only the keys that are delivered. The resume of a gate and of a media park take the flow's own signal, so Esc or Ctrl+C while the answer is prepared stops the leg before it starts. Cognitive complexity and nested ternaries of the Home files are reduced with the tests unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…un detail says when its step list was cut, a run notice is bounded before it is clipped, a bad cursor ends a gate read instead of throwing, the final summary offers only shell-inert commands, and the permissions store appends through the shared descriptor helper (PR #102 review follow-ups) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…roject artifacts; a bare agent id with no home refuses instead of reading the process's own (PR #102 review: H2, L3) discoverCatalog, readAgentFile, resolveWorkflowSource and their helpers take the home as a required string; loadConfigFile's project layer requires one by type (a union), and the one place that resolves the home from the environment is resolveHomeDir. resolveYamlSource and the chat agent resolver take string | undefined, because the chat session's operator home is deliberately optional (no output store, hermetic embeddings): a bare id with no home now fails closed with a fixed sentence. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ger cancel the run itself, the MCP consent card refuses a path it cannot show safely, an unreadable config refuses the pick, the capability sentence is the host's own row and names the commands and process tools, and a faulting cleanup leaves the owner retained (security sitting of 75b37b3: H1, M1, L1-L6) The signal the resumers now pass tied the leg to the engine's cancel until acquire returned, and the sitting reproduced it: an abort inside resumeFromCheckpoint wrote run:cancelled for good. A leg now has a commit point (ports.commit): resumeRun calls it after its last checkpoint and before resumeOrFail, prepareRun before engine.start; before it an abort stops the leg and leaves the gate pending ('Cancelled. The run is as it was.'), after it a cancel only closes the flow. The consent card throws a fixed refusal before any row when a repository-controlled executable, directory or previously approved path would not survive the author scrub (a path named './tools/Ctrl+Y refuses this - Ctrl+N allows/srv' forged a key). A shell-inert command rule now lives in render/run-command-text.ts and finish-leg.ts uses it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e true: forced writes, exact credential names, search skips and links, the bounded reads, the consent and outbox descriptors (PR #102 review) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…review: what was fixed, refuted, deferred and left to the maintainer Dated notes only on the ADRs (0035, 0048, 0084, 0115, 0139, 0140, 0143, 0144); the register closes what the commits closed and adds the deferrals and the maintainer decisions; the phase record gains 'PR #102 review corrections' with the three security sittings' findings and a table of fixed, refuted and deferred findings. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ntion rows, the cards and the browsers now do (PR #102 review) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d reported, the in-chat project export is pinned to its directory, export's default name refuses a Windows device id, and a re-export keeps its group (second security sitting of 2de9eef) The sitting reproduced a swap that placed the replaced file in the swapped-to directory and refuted the comment that said it could not. The words are corrected (a second principal with write access to .relavium can still place the temporary or the replaced file elsewhere; a true pin needs openat/renameat, which Node lacks), and replacePlainFile now takes the temporary's identity before the rename and checks, after the guard and after the rename, that the name holds it: a mismatch is reported with a fixed sentence that the file may have been written to another directory. The in-chat project export computes the canonical workflows directory once and names it in every operation, and replaceFileForStorage carries the old group like the forced write does. com0 and lpt0 join the reserved device names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…re the library composes it, and the catalog scan has a token budget; config and run reads stat before they open; the consent log and outbox refuse a hard link and cap a line (third security sitting)
The key budget did not bound the decode cost: [{a,b},...] at 2 MiB still cost about 9 s and 1.2 GB, and eight such files
about 51 s and 2.75 GB on the UI thread. decodeHardenedYaml now counts the structural characters in one linear
pass and refuses a source over 120,000 (RESOURCE_EXHAUSTION, 'the document is too large to read safely') before
anything is composed; the catalog charges the same count per scan against 200,000 in name order, so the worst case
that still passes is a fraction of a second and the hostile shapes are refused in milliseconds (eight hostile
files: 26.8 s and 2.7 GB before, 10 ms and 115 MB after). loadConfigFile and tryRead stat first, refuse a
non-regular or oversize file without opening it, open with O_NONBLOCK|O_NOCTTY and require the same dev/ino.
appendToOwnerOnlyFile refuses a file with more than one link. A consent grant line is capped at 16 KiB by
trimming comparison metadata (the digest is never touched), and a record that would take the log past its read
cap is refused with the recovery step named.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… graph, the workspace job is thirty minutes, and the permanent cohort pins 582 cases (PR #102 gate) The gate in a still tree found four pins the branch had moved: the retained source-manifest check capped the captured source files at the shared 2,000 (the graph was 1,987 at the step-5 head and passed it once this PR's files were counted; a separate 4,096 bound, as the raw-receipt files already have, keeps the byte caps fixed); the workspace job's timeout was 25 minutes and is now 30, the most the source-smoke check allows (tools/ci/require-packed-cli.test.mjs), where an earlier commit had set 35; and the permanent usage cohort collects 582 cases. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…wn sentence and its other name is left alone (PR #102 review) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d say what the second and third security sittings changed (PR #102 review) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd three test fixtures spell their bidi characters as escapes (Sonar: S2871, S6389 on PR #102) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…alk, not the first forty (PR #102 CI: Linux) The search walk's last poll depends on the Node version (the runtime's own fs calls also read signal.aborted), so on the CI runner the window between an entry's listing and its open lay past position 40 and the test counted no vanished entry. It now runs positions until the walk has none left, and fails if it reaches a generous ceiling. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n cognitive-complexity functions split, sixteen nested ternaries and six nested templates removed, a linear trailing-zero trim, skipIf for platform tests, specific matchers (no behaviour change) resumeRun (34), logsFollowCommand (23), readCatalogText (20), tryRead (19), formatRunOutputs (17), discover (17, only its four argument refusals extracted) and resolveNodeStatus (16) are under the limit with the existing tests unchanged; the order of every checkpoint, the lease check, the commit point and the secret-before-key-before-MCP order is kept. usdTextOfMicrocents no longer uses a quadratic regular expression (it only ever saw a 25-character stored integer, so this was not reachable by typed input). The 132 charCodeAt findings stay: the highlighters scan UTF-16 code units by design (ADR-0144). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…on the resume path (H1 commit point), human and media A sweep of the abort over depths 0..16 after the engine is built: every position ends refused/stopped with the run paused, or started and completed, never run:cancelled; both outcomes must occur and be monotonic so a refactor that moves the boundary fails loudly. Mutation: removing the commit call fails the sweeps and the H1 tests; one await inserted before the commit fails only the sweeps (at depth 8). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…le local gate passed on a still tree at the code head Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
cemililik
added a commit
that referenced
this pull request
Nov 24, 2026
…e merge checkpoint, the status documents and the register brought up to date PR #102 was merged on 2026-11-24 as c17e976 (its tree is identical to the final head f9cf262's). The new "PR #102 merge checkpoint" in the Phase 2.6 record states what the PR carried (157 commits: MVP-8's five steps, ADR-0139 to 0144, the answers to three external reviews and three security sittings, the Sonar fixes), the final-head evidence (CI run 45322172313: all 29 jobs green; the pull request's Sonar gate OK; the whole local gate green on a still tree at ae0326d) and what it does not show (the Windows runbook rows 1-38, the analysis and the push run of the merge commit on main, the maintainer's decisions, the stale pull-request description). current.md, CLAUDE.md, AGENTS.md and README.md say MVP-8 is complete and MVP-11 is next; mvp-11.md no longer waits on the pull request. The register closes the entries that listed the gate and the build as owed, notes the removed fixture directories and registers the 138 intentional SonarCloud smells (132 S7758, 5 S9382, 1 S6582) that need a maintainer's mark on main. Refs: ADR-0139, ADR-0140 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cemililik
added a commit
that referenced
this pull request
Nov 24, 2026
…sis of the merge commit (gate OK, no bug, no vulnerability) The analysis of c17e976 finished at 08:05Z; the merge commit's push run was still running when this was written and its result is not claimed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What
MVP-8 of the CLI MVP (Phase 2.6): the Home becomes the hub. The person types
relaviumand, without leaving the Home, runs a workflow, answers its gates, browses and resumes work, looks at an agent, reads help, and imports a workflow or sets a model price. Subcommands stay for scripting (ADR-0122). Five steps, each with its own review rounds and, on every approval, consent, write, egress or resume path, a separate security sitting (the D64 tier). The records are in the phase register.Two ADRs were written and accepted before any code: ADR-0139 (a run is hosted inside the Home) and ADR-0140 (the management browsers, the run drill-down, the durable run detail). Each carries dated as-built notes, corrections and maintainer rulings; nothing was rewritten.
0022(run_pins, a project/created index), keyset-paged run, event and step reads, the content-freetoolActivitytrace,logs --failedandlogs --follow.prepareRunandresumeRunshared by the shell and the Home; the stale-gate-card fix (ownership lost after a refused guarded append); a two-process gate-resolve test;driveRungeneralised, the prompts as ports, and byte-identical output forrun,gateandbudget resume./runand the launch form (inputs, masked secrets, confirmation, MCP consent), native gate, budget, consent and secret cards behind the approval-card guards, the run view, a background leg (Escleaves, twoCtrl+Cpresses cancel), the exit guard and the strip's run row./workflows(Defined, Active, History, run detail, node detail) with paging, an idle poll, pins and an export card, and the permissions tab composing the existing sheet./agents(Defined, Sessions), the agent detail and chat with an agent;/agent;/help; the typed-slash rule (a line starting with/is answered at the landing and never starts a chat); the/importandmodels pricingforms, built as prepare/commit splits with characterisation tests of the shell output; a run parked on media jobs alone can be continued from the Home behind a Yes/No question.Also in this range: the markdown, table and code rendering ADRs (0141 to 0144), and the Sonar and PR #101 follow-ups.
Review and security
15b30d68..8dbe6172. Every finding was probed against the code before it was fixed. Ones that were wrong are recorded as such: one claim of mine (HOMECTL-2, "text after a word starts a chat") was itself wrong, was reversed to the ADR-literal rule, and is withdrawn by a correction note in ADR-0140.Verification: read this part
The local
pnpm gatehas a green run for every step, but there is no single uninterrupted gate run on the final head. CI on this PR is the authority.test-acceptance-toolson two stale pins: the doctor control's source anchor (RUNCORE-3 wrapped thereadConfigbranch in atry, moving it two columns) and the permanent usage cohort (561 to 580 cases from tests added since the pin). Fixed in9b5447b4.commands/chat.test.ts172 to 185,commands/create.test.ts11 to 13). Fixed ina8b48018; each affected control was re-run alone (fixed and restored pass in full, the mutant still fails), and a count check of all 33 control file sets against a real vitest collection found no other drift. The gate also voided run 2 as a whole, because I committed while it ran.a8b48018(removed afterwards), because the controls require a still tree and two other sessions were using the shared checkout while a flood of VS Coderg --fileswalkers pushed the load above 150 (phases then lost their reports: "missing completed report", not a code failure). All three passed: 897 s, 842 s and 871 s.a8b48018; the steps were not run back to back on one tree. The detail is in the step-5 record, "The gate".relaviumon npm is still0.1.1; no publication is claimed here.Commit hygiene
8dbe6172("feat: add agents and sessions tabs…") has no scope and no co-author trailer. History is not rewritten.🤖 Generated with Claude Code