Repository navigation
mozak 0.5.0 (draft, CI only, do not merge) - #2
Merged
Merged
Conversation
# Conflicts: # docs/installation.md
…rose, graph, ready and check rules mozak.annotations.json holds cross-plan refs (needs, informs, supersedes) and deadline overrides with owner provenance per item and its own receipts. Only the owner route annotate writes it: one temp file and one rename under the scope lock, CAS on the sidecar token only, so agent snapshots never go stale. mozak.json and mozak.md are unchanged. Leftover cleanup and the gitignore lines now cover mozak.annotations.json temp files. mozak-settings.json next to the inventory switches annotations per scope and repo-mode remotes are refused. Adds graph, ready, plans sort by deadline and check findings for refs. Tests cover V-ref.
….6 with rebase on)
…e route and refs in the sidebar The CLI adds graph, ready, plans --sort deadline and the owner route annotate. MCP adds the read tools mozak_plan_graph and mozak_ready and the plans sort argument; annotate stays out of MCP. The Obsidian sidebar lists outgoing and incoming refs under each plan row.
…old-client check script graph and ready return the sidecar token per scope, which annotate takes as expectedAnnotations. docs/annotations.md describes the file, settings, resolution, the deadline rule, views and check findings. The skill routes list graph, ready, plans --sort deadline and the annotate request. scripts/verify-old-client-sidecar.sh runs a released CLI on a synthetic scope with a sidecar.
Only a new challenge reopens it. Plan complete still needs an owner acceptance bound to the exact current evidence.
…oduces the README example
…ry lookup and the 60 second default sync; add versions.json
… from another host or a dead local pid; check reports stuck locks
…rrent, not a bridge conflict
… use mozak; add docs/README.md index
…the release notes
Changed fields are listed in schema order, so the note rendered at write time equals the one rendered from the reread graph.
…inventory The scope-root settings file is no longer read: a scope folder can be a public repo, and one file per installation is simpler. The setting lives under scopes.<id>.concurrency.rebase with a top-level default, still off by default. check reports a leftover scope-root file as settings-scope-file-deprecated.
…ink check, README install and example)
…e record, refs resolve as pruned and the id stays reserved
Hosts that cut long tool output hid why a call failed behind the echoed unsavedRequest. Core error results now list issues before the request, and the MCP text starts with reason and issues.
…without a mozak write
…metric windows, kill rule, re-proposal block)
…cal copies; plugin reuses it; noteKey uses foldKey; parity test for the eval fold copy
…on-conflict, scope-not-found, plan-not-found, busy, invalid-json, scope-mismatch, scope-uninitialized, bridge-unavailable, capacity-exceeded, continuation-stale); codes unchanged; tests pin the guidance
…ns, noFallthroughCasesInSwitch and noImplicitOverride; remove four unused locals and mark plugin overrides
… scripts; proposed CI workflow that runs lint as its own step
…was left, dependency and license table, open risks); changelog and verification status
The sidebar button was shown only with remote scopes and synced only them. It now runs core sync with local: true, so every git repo that holds a local scope (the vaults) is fetched and fast-forwarded under the scope locks. Never pushes or merges a diverged history; the notice names vaults that are ahead or diverged. Background polling still syncs remotes only. Label: Sync vaults and repos. Disclosures updated.
Why: spec step 2 of mozak 0.5.0 merges the tested Hermes integration branch once instead of slice by slice. What: 21 conflicted files resolved by the spec rules. Main's features after 0.4.5 stay whole (plan delete, flag forms, plan show, --commit, git test isolation, config before route, 0.4.7 and 2a fixes). The 2a versions of the P0 and S1c fixes stay. Gap 8 keeps main's sorted order (Hermes bdc2cc7 reverted with its test). Format-1 modules stay until step 5, stricter tsc flags wait for step 5. package.json keeps main's test command and adds typecheck and lint, no eval scripts. README and CHANGELOG keep main's text. prune.ts withoutPlans renamed withoutRejectedPlans (clashed with delete.ts in the core exports). plan prune --rejected allowed next to --request. Per-file notes in the run folder's RESOLUTION.md. Proof: npm ci, build, npm test 661 of 661 (default TMPDIR). Full three-setting gate recorded in PROGRESS.md.
Why: owner decision for 0.5.0 (spec step 4a). The harness and the tend helpers stay on the unmerged Hermes branches on GitHub. eval/lib/armA.mjs hardcoded a ~/.hermes ripgrep path, which goes with it. What: delete eval/, packages/core/src/tend.ts with its export and its test, skills/mozak-tend. paths.test.ts drops the eval fold parity check. README, docs/audit-2026-10.md and the auto-merged Hermes verification paragraphs in docs/installation.md no longer cite eval or ~/.hermes. New release-scope.test.ts: no eval/tend files, no tend export, no eval script, no tracked file naming eval/* or ~/.hermes/ (failed before the removal for those reasons, passes after). Proof: build, npm test 652 of 652 under default TMPDIR, /tmp and a realpath folder, test:install 73 + 1 skipped, lint 0 broken links. ub-mode: deletions only, no new or changed source function to score.
Why: owner decision for 0.5.0 (spec step 4b). Nothing is written to .mozak-cache/usage/ unless the owner asks for it. What: usageLogEnabled(env, setting) is on only for MOZAK_USAGE_LOG=on, 1 or true, or when mozak-settings.json has "usageLog": true. An explicit 0, off or false wins over the setting. Settings gain the usageLog key (usageLogOf validates it, an invalid value makes the settings file invalid, the log stays off and check reports it). executeOperation reads the setting through usageLogSetting. Tests that inspect the log now opt in. context-modes.test.ts goes back to main's stricter check (no side file at all next to the scopes after a read). README and docs/plans-index.md say the log is opt-in. Proof: new tests failed first (default off, setting on, env wins, usageLogEnabled table), pass after. npm test 656 of 656 under default TMPDIR, /tmp and a realpath folder, test:install 73 + 1 skipped. ub-mode: CRAP usageLogEnabled 8.0, usageLogSetting 3.3, usageLogOf 3.0 (loadSettings, Hermes code, 58.8 before, 53.6 after, shape unchanged). dryer: no candidates. mutator on changed lines: usageLogOf 3/3, usageLogSetting 1/1, usageLogEnabled 13/14 (survivor ?? to || on env.MOZAK_USAGE_LOG ?? "", equivalent for undefined and "").
Why: owner decision for 0.5.0 (spec step 4c). A scope without the setting must behave like 0.4.7. What: annotationsMode is on only for scopes.<id>.annotations: true in mozak-settings.json (repo-mode remote scopes stay refused, annotations.personalVaults is accepted and no longer turns anything on). annotationsEnabled wraps it for an inventory, an invalid settings file keeps annotations off. Core reads the sidecar only through sidecarOf (graph, ready, plans --sort deadline, continuation tokens, check) and the plugin only when enabled, so an off scope never reads mozak.annotations.json. check still warns about a sidecar file in a repo-mode scope (existence only). annotate refuses with annotations-disabled and names the setting to turn on. Tests that annotate opt in through the fixture's annotations option. Docs: annotations.md, both plugin disclosures, the skill's routes.md. Proof: new annotations-default.test.ts (default off for annotate, graph, ready, sort, check, plugin; mozak.md byte-identical with and without a sidecar, render leaves it alone; invalid settings stay off) failed first, passes after, plus a repo-mode warning test. npm test 663 of 663 under default TMPDIR, /tmp and a realpath folder, test:install 73 + 1 skipped, lint 0 broken links. ub-mode: CRAP annotationsMode 6.0, annotationsEnabled 3.0, sidecarOf 2.0, annotationCheck 7.0, annotationsToken 5.7, universeOf 8.2 (crossPlanOp, Hermes code, CC 16 at 17.3, one call changed). dryer: no candidates. mutator on changed lines: annotationsMode 10/10, annotationsEnabled 1/1, api.ts changed lines 3/3 covered sites killed.
Why: owner decision for 0.5.0 (spec step 4d): the experimental read-set rebase stays off unless the owner turns it on. What: settings-rebase.test.ts gains a test that a stale observe is refused with stale-input and carries no rebased field when there is no settings file, a file without concurrency, or a file that only turns annotations on. No code change: the Hermes code already defaults off. The test pins it (it passed on first run, so there was no red phase). Proof: npm test 663 of 663 under default TMPDIR, /tmp and a realpath folder, test:install 73 + 1 skipped. Test-only commit, no ub-mode scores.
Why: owner decision for 0.5.0 (spec step 5). No CLI route, MCP tool, plugin file or installer script uses format 1. The format-1 routes in api.ts keep refusing with unsupported-legacy-operation. What: remove packages/core/src parse, check, graph, stale, translate, init, write and plan with their exports and tests (graph, init, plan, stale, translate, write, parse tests and writer-child.ts), notes.ts wikiNames (used only by stale.ts), scripts/demo.ts and scripts/render_gif.py. tsconfig.base.json gains noUnusedLocals, noUnusedParameters, noImplicitReturns, noFallthroughCasesInSwitch and noImplicitOverride (the code already compiled with them after the merge). package.json adds loc (typecheck and lint came with the merge). The ten next-step error messages from the audit are already in core (verified, error-messages.test.ts passes). No CLI, MCP or plugin route changes: packages/cli, mcp and obsidian are untouched. The core export list differs from the step-4 tree only by the 23 removed format-1 names. docs/audit-2026-10.md describes this redo. Proof: release-scope.test.ts gains a format-1 guard that failed on the step-4 tree and passes now. npm test 611 of 611 under default TMPDIR, /tmp and a realpath folder, test:install 73 + 1 skipped, lint 0 broken links, npm run loc 10889 non-blank source lines (core 8996 to 8336). Deletion only, no ub-mode scores.
…d plugin Why: spec step 6. The owner wants a Focus tab in the sidebar. Focus is a sidebar marker only: agents can read it, never write it, and it is not plan state (owner answer A: no AGENTS.md rule, no mini-control change). What: - Storage: each local or remote scope entry may carry focus, an array of unique plan ids. The inventory loader accepts the key and refuses a malformed list. The digest (format plus sorted id and root) is unchanged. mozak.json and mozak.md never change. - Core focus.ts: readFocus, setFocus (inventory write lock .mozak-inventory-lock, temp file flushed and validated with the normal loader before the rename, entry order, indent, final newline and every other key including x kept, idempotent, add refuses an unknown scope or plan), focusList and focusChange envelopes, renderFocus. The lock code moved from scope-store to dir-lock.ts so the scope lock and the inventory lock share one implementation. check warns focus-unknown-plan for a starred id that is not a plan. - CLI: mozak focus list [--scope] [--json], mozak focus add|remove --scope --plan (owner). MCP: read-only mozak_focus, no write tool. - Plugin: tabs Open, Focus, Done (All removed, rejected plans in no tab), a star on every plan row calls setFocus through focusChange and stops the row click, default tab Focus when it has plans else Open, last tab kept in plugin settings, empty Focus says "Star a plan to focus on it", rank unchanged. Styles for the focus pill and star. - Docs: plugin README and both disclosures say the plugin never writes plan state, may regenerate mozak.md and may edit the focus lists. installation.md 6a, release notes (upgrade both machines before starring: mozak before 0.5.0 refuses an inventory with focus), the skill's routes.md row. - Mini sync: the vault test for mozak-inventory-sync --transform shows focus arrays pass through unchanged (vault commit 795a8cc9, 13 of 13). Proof: new core, CLI, MCP and plugin focus tests failed first (missing module, missing exports, unknown route), pass now. npm test 630 of 630 under default TMPDIR, /tmp and a realpath folder, test:install 73 + 1 skipped, lint 0 broken links. ub-mode: CRAP setFocus 9.0, focusList 6.1, planMatches 6.0, assertFocus 6.0, nextFocus 4.0, defaultFilter 4.0, focusChange 3.3, writeValidated 3.1, focusWarnings 3.1, others 1 to 3. acquireDirLock 17.3 is the old scope-store acquire (17.4) moved unchanged. planViewModel 76.1 and scopeViewModel 17.7 were 76.1 and 16.9 before (one parameter, one set). dryer: no candidates. mutator: focus.ts 26 of 26 covered sites killed (2 uncovered in writeValidated's temp-file cleanup on a failed load), model.ts changed lines 12 of 12.
… names Why: spec step 8. The shipped docs still described the agent drafts (a Hermes branch, a not-yet-listed plugin, an unpublished npm package) instead of what lands in 0.5.0. What: - README: "The problem" section, a real example produced by scripts/readme-example.mjs (now reads stdout only), the npm install line, a "New in 0.5" section, quick-reference rows for focus and recover. - docs/release-notes-draft.md: highlights match the branch (focus, store hygiene, smaller core, annotations and usage log off by default), known limits point at installation.md section 8 for the p95 number, release steps match release.yml (v0.5.0 tag creates the 0.5.0 plugin tag on the same commit). - docs/obsidian-submission-checklist.md: the plugin is already listed, so 0.5.0 is an update; minAppVersion 1.14.4, risk A fixed and tested, new risk C (the star writes the inventory), owner steps for 0.5.0. - Agent names removed from shipped docs and one test fixture (roadmap.test.ts outcome id). Old CHANGELOG history lines stay. - The CHANGELOG rewrite moves to the version bump commit, because the version test needs a heading for the current version. Proof: gate 08-docs with the CHANGELOG rewrite in: 629 of 630 in all three TMPDIR settings, the one failure being "CHANGELOG has this version" (0.4.8 heading folded into 0.5.0). Without it: doctor, roadmap, obsidian and release-scope tests 62 of 62, test:install 73 + 1 skipped, lint 0 broken links (57 relative links). ub-mode: docs and a test fixture only, no production code changed, so no crapper/dryer/mutator run.
Why: spec step 9. 0.5.0 replaces the untagged 0.4.8.
What:
- 0.5.0 in package.json, package-lock.json, the four packages and
their @mozak/core pins, manifest.json and the plugin manifest.
- versions.json: "0.5.0": "1.14.4" (same minAppVersion as 0.4.x).
- CHANGELOG: one 0.5.0 entry that folds in the untagged 0.4.8 and
lists only what landed on release/0.5.0 (Focus tab, annotations and
usage log off by default, store hygiene, format-1 removal, fixes).
- README: test count 630.
Proof: the version test failed first ("CHANGELOG has this version")
with the 0.5.0 CHANGELOG over 0.4.8 packages, passes now. Gate
09-version: build ok, npm test 630 of 630 under the default TMPDIR,
/tmp and a realpath folder, test:install 73 + 1 skipped, lint 0 broken
links, built CLI prints 0.5.0.
ub-mode: version strings and docs only, no code changed, so no
crapper/dryer/mutator run.
Why: spec steps 10 and 11. installation.md section 8 needs the real commands and numbers for this release, and the old-client verifier silently stopped after annotations became off by default (step 4c). What: - scripts/verify-old-client-sidecar.sh writes a mozak-settings.json (format mozak.settings/v1) that turns annotations on for its synthetic scope, and now fails loudly when no sidecar is written or the old client changes it. Before: the annotate step was refused with settings-invalid / annotations off, the && chain hid it, and the script printed "sidecar unchanged" over a missing file. - docs/installation.md: header row and five section 8 rows for 0.5.0 (full gate on Node 26.10.0 and 24.11.0, verifiers, V-race 9 at 1000 attempts, old client and upgrade from v0.4.7 in scratch prefixes, real plan data on copies). - docs/release-notes-draft.md: the large-store p95 met the 300 ms target in both runs (222.9 and 219.6 ms), so the known limit now says what was measured. Node 24.11 was run locally. Proof: the old-client script against a scratch v0.4.7 install failed first (no sidecar, annotate refused), passes now: old reads, check and write exit 0, sidecar unchanged, branch graph 1 edge 0 dangling. Full gate at 9c26892 on Node 26.10.0 and 24.11.0: 630 of 630 x3, install 73 + 1 skipped, typecheck, lint, build:npm 0.5.0, release.yml version check, verifiers 41 of 41. This commit: lint 0 broken (62 links), vref and doctor tests 12 of 12. ub-mode: docs and one shell script, no TypeScript changed, so no crapper/dryer/mutator run.
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.
Draft pull request that exists only to run CI on release/0.5.0. It is not merged by an agent. See CHANGELOG 0.5.0 and docs/release-notes-draft.md.