Repository navigation
chore: remove dead ADR references and fix stale code comments - #2169
Merged
Merged
Conversation
Move docs/drafts/ and docs/design/surface-migration-plan.md to docs/proposals/. Every proposal now starts with a Status, Owner, and Last updated header; instruction-files.py enforces it and fails on Status: implemented, because the implementing PR should fold the proposal into docs/ or user-docs/ and delete it. Root AGENTS.md and docs/README.md state the rule; inbound links follow the move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
architecture.md goes from 2,200 lines to 250: what Mecatl is, layers and how the dependency direction is enforced, how one prompt flows end to end, a code map, and the platform principles. Subsystem material it used to hold moves to the owning chapters (credential store, caller identity, SDK, Studio, scheduled tasks, reflection, placement, stream retry). docs/design/principles.md is folded in and deleted, along with its ADR citations and acceptance-plan machinery; panel-review now points at the overview's principles section. Corrected against code: engine/learning is a core domain package; governance is stdlib-only and tool imports only session; internal/app is also imported by internal/cliconfig; the code map adds the execution provider binaries; the pairing principle names the seams that check it (history replacement and compaction); command runners use ScrubWithInherited. Co-Authored-By: Claude Opus 5.5 <[email protected]>
domain-model.md (235 → 150 lines) covers the Session aggregate, messages and replay fields, the state machine, tool call/result pairing and the seams that keep it, typed tool results (moved from architecture.md), events, titles and token accounting, and the harness context runtime. ports.md (223 → 130) covers why ports stay narrow, the main ports and their non-obvious contracts, the tool contract, the Environment and Workspace seam, and why tests use reference adapters plus conformance suites. Corrected against code: the authorizing state and the Abandon recovery seam; repairTerminalState (not loadAndReopen) applies recovery; terminal transitions reject authorizing; readers keep unknown usage kinds; ReasoningItemID is a fourth replay field; AuthorityEvaluator, SessionLiveness, and DeliveryQueue are ports; the run budget counts main and router usage; retiring a harness context defers cleanup rather than waiting. Co-Authored-By: Claude Opus 5.5 <[email protected]>
agent-loop.md (451 → 178 lines) covers the engine and run handle, the drive algorithm, read-parallel/mutate-serial dispatch and the barrier for direct-write children, permission pause and resume across restarts, the plan-approval gate, steering, and system-prompt assembly (moved from architecture.md). context-and-compaction.md (200 → 109) covers the window, token counting, when compaction runs, both compactors, why tool history must stay paired, manual compaction, and failure modes. Corrected against code: the run token budget counts main plus router usage; composition wires the user model through OperatorProfileSource, not the turn-0 assembler; tools that can request external authorization also leave read batches; the 0.6 target applies to any budget-accepting compactor; the tier-4 summary uses the compaction-slot model. Co-Authored-By: Claude Opus 5.5 <[email protected]>
subagents-and-teams.md now covers all three delegation tools in 170 lines (from 248 + 156): what every child shares (bounded session, no nesting, narrowed authority, context isolation, permissions), Subagent modes by intent, direct-write children and the dispatch barrier, Parallel fork-join, teams, and where child workspaces come from (including delegation never accepting placement input). parallelism.md is deleted. Corrected against code: a merging Parallel call reports MutatesParent and runs alone; first/judge report an opaque artifact handle, not a path; only Subagent and Parallel share drainChildObserved (teams stream); direct-write uses directWriteCommandRunner; a failed dirty overlay sends the child a degraded-fork advisory. Co-Authored-By: Claude Opus 5.5 <[email protected]>
governance.md (180 lines) gathers what decides whether a call runs: permission resolution and why configured Ask is never bypassed, shell checks, the posture ladder, workspace trust, the command-runner environment, untrusted-content fences and child isolation, lifecycle hooks, and model-backed guardrails. It replaces hooks-and-guardrails.md and absorbs the governance half of deployment-and-hardening.md and the untrusted-content section of architecture.md. Corrected against code: a PreToolUse-rewritten call is re-authorized; plan mode also denies Copy, Move, and Remove; learned allows are user scope with the built-in floor below; shell parsing lives in shell.go; posture raises trust only on interactive roots while --trust-project trusts directly; the project authority set includes model bindings, rules, and instruction files; trust never carries to alternate roots; contextual review runs in engine/agent, not modelhook; guardrails also do permission review and fail closed by default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cut providers.md from 859 to 199 lines: adapter invariants, wire adapters vs registry identities, per-session routing, model inventory, aliases and slots, and the semantic model router. Flags, settings keys, and per-function detail now point to the public configuration pages. Corrected against code: the missing openrouter-anthropic identity, the reflection and title slots, tier fallback only when the tier is bound, bearer-token availability for openai, default-provider order, and the unknown-context-window rejection. Co-Authored-By: Claude Opus 5.5 <[email protected]>
observability.md goes from 573 to 199 lines: the three separate contracts (diagnostics, audit, events), the durable event log and its consumers, telemetry composition, persistence, the session lease, remote store and source drivers, and provider resilience including semantic stream retry (moved from architecture.md). Flags, metric catalogs, and JSONL internals give way to links to the public pages. Corrected against code: latency instruments share one explicit-bucket ladder (LatencyViews); OTLP can also push metrics; memstore.Store does not implement SessionLease (memstore.Lease and memlease do); an approval on a persisted awaiting session resumes the run instead of returning ErrNoActiveRun; the lease is held for the session's life, not per run. Repoints an otlp.go comment that cited a removed section number. Co-Authored-By: Claude Opus 5.5 <[email protected]>
api-surface.md (171 → 220 lines) covers how gRPC, HTTP/SSE, and ACP share one Service, contract generation and negotiated compatibility, the live stream and durable watch semantics, session commands and successors, scheduled tasks, the TypeScript SDK, Mecatl Studio, and the engine-as-library contract. The SDK, Studio, scheduler, and successor sections move here from architecture.md; RPC lists and routes now link to the reference pages. apps/README.md follows the Studio anchor. Corrected against code: ACP starts with `mecated acp`, not a flag; there are eight core packages; Studio pins an exact SDK version; SDK callback tools are authorized; Converse can end at an authorization park; Run.Cancel leaves a parked authorization untouched; schedule claims are at-most-once, not exactly-once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
deployment-and-hardening.md (358 → 200 lines) now covers only the server process: edge authentication, caller identity and ownership, the event-log actor, protected-resource discovery, the internal credential store, remote mecatui login, rate limiting and shutdown, multi-replica operation, and the mecated/mecak8s/mecatequi shapes. It absorbs those sections from architecture.md; permissions, posture, and trust moved to governance.md and placement to microvm-environments.md. Corrected against code: static bearer and OIDC are mutually exclusive at startup; appendEvent is the only actor-stamping site (there is no AppendRunEvent); system principal roots include model-catalog-refresh and stale-session-reconcile; mecak8s accepts a mounted workspace and is not strictly storage-free; a plain-file credential backend exists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
extensibility.md (310 → 173 lines) covers MCP (why streaming HTTP only, server sources, admission and naming, revisioned reconciliation, the session-scoped broker, secret-shaped headers), skills and slash commands, nested project instructions, progressive disclosure, built-in web retrieval, and library extension points. Broker, slash-command, and web-retrieval material moves here from architecture.md; the seam table and non-goals list are dropped because each seam has its own chapter. Corrected against code: skills live in engine/adapter/skillfs; validateSkillDraftConfig is in internal/app; direct MCP supports DCR; the project skill tier is withheld for untrusted workspaces; learned skills publish live through AtomicCatalog; drafting goes through the lifecycle drafter when a learned-skill store exists; progressive tool disclosure is off in every shipped host; broker admission is all-or-nothing while direct registration is first-wins. Co-Authored-By: Claude Opus 5.5 <[email protected]>
memory.md now covers both stores' shared CAS contract, how memory reaches the model, the safety boundary, caller scoping, consolidation, and evidence-backed reflection (moved from architecture.md), in 149 lines. Settings and workflows point to the public learning and dreaming pages. Corrected against code: memory is partitioned per caller under ownership enforcement (memory.NewCallerStore), mecatui enables project memory by default, the model-visible tool names, and which internal engines omit the operator profile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
microvm-environments.md (292 → 149 lines) now explains the placement contract first (server-owned bindings, exact reattachment, the governance root, alternate worktrees, schedules, delegation), then the local microVM runtime: repository identity, logical worktrees and routing, delegation and merge, image and credentials, networking, and readiness and recovery. The placement sections move here from architecture.md and deployment-and-hardening.md; the live-journey test record and deferred list are dropped. Corrected against code: Darwin arm64 is admitted (experimental), not compile-only; a compatibly configured stopped daemon is restarted; there is one user-local microvmd managing per-repository VMs; deleting a schedule keeps its placement after the first claimed fire; mecak8s can install a remote execution provider; the microVM provider rejects worktree selectors; the Redis filesystem provider is listed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tui.md (142 → 130 lines) keeps the client boundary, layout and navigation, conversation feedback, styling, and verification rules, and absorbs the current, non-obvious parts of architecture.md's mecatui section. The provider-resilience link now points at the observability page instead of a heading anchor. Corrected against code: the ui/theme import rule is a convention, not a lint rule (no depguard entry covers cmd/mecatui); terminaltext lives at cmd/mecatui/internal/terminaltext. Co-Authored-By: Claude Opus 5.5 <[email protected]>
perf-tracking.md (665 → 220 lines) drops the ADR scaffolding, phase status history, roadmap, and open decisions, and keeps what we track and why, the benchmark harness, regression gating, baseline storage, the dated baseline snapshot, PGO, and how to add a scenario. perf-measurement-survey.md (285 → 83) becomes a question-to-technique map filtered to what Mecatl actually runs, without the generic Go tutorial. Code comments, Taskfile descriptions, perf.yml, .gitattributes, and the perf-optimization skill cited "Phase N" headings or the deleted ADR 0019; they now name the current sections. Comment-only changes. Corrected against code: BenchmarkReadOnlyBash is BenchmarkReadOnlyShell; the steady-state turn benchmarks exist and are gated; the main-branch trend is per-commit medians from benchtrend; RSS and wall-clock are recorded in the JSON only; the OTel runtime collector and metrics exist; histograms are explicit-bucket; PGO reads cmd/mecated/default.pgo. Co-Authored-By: Claude Opus 5.5 <[email protected]>
READING.md and docs/README.md now route to the rewritten chapters: foundations (overview, domain model, ports, agent loop), then one table of topic chapters, with parallelism folded into subagents and hooks-and-guardrails replaced by governance. Root AGENTS.md points at READING.md for how the system fits together. Two module pointers go where a chapter explains something the code does not make obvious: engine/AGENTS.md on MutatesParent for read-only tools that can write the parent tree, and internal/AGENTS.md on the governance root versus the execution root. The embed-engine guide's reflection link follows the section to memory.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
governance.md implied that any server is headless, so readers took `mecated` to be one. Headless is a per-binary setting: mecatui is always interactive, mecated is interactive unless started with --headless, and mecak8s and mecatequi default to headless. Also state that the trusted posture's only effect is raising project trust. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The last merge from main kept this branch's relative user-docs links in docs/README.md, undoing main's switch of the audience routes and the public-documentation link to mecatl.dev and GitHub URLs. Restore main's version of those lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- perf-tracking: no default.pgo is committed; it is absent, not empty. - deployment-and-hardening: a local store directory always gets a flock session lease (internal/app/build.go buildSessionLease), matching observability.md. - domain-model: user_prompt reaches clients as a scheduled-delivery note; name ClaimAuthorization and the RestoreAuthorizationClaim edge; Abandon keeps a pending exact retry. - providers: name Typesafe System One, list the reserved synthesis slot, and add the architecture-guide back-link. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- dispatch.go preHook: a hook-rewritten call is re-authorized on the effective args (authorizeBound / reauthorizeApprovedCall); the comment said it was not. - evaluator.go: ScopeUser is the lowest configured scope; ScopeBuiltinDefault sits below it. - Taskfile, perf.yml, perf/: drop "Phase N" labels from the removed perf roadmap. Comment-only. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- subagents-and-teams: the forker's own git worktree add runs under the gitenv scrub (internal/adapter/forker/forker.go). - governance: guardrail checker usage is charged to the reviewed session and late usage after the run ends is dropped (engine/agent/loop.go recordGuardrailUsageWhileActive). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The guardrail slot falls back to the cheap tier (internal/app/slots.go), and guardrailsConfigured follows that fallback. An operator binding cheap for compaction also gets enforcing guardrails and their checker cost. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Point agents at the one chapter they need, only when the code doesn't answer the question, instead of a reading map to start from. Add the docs/ counterpart of the existing user-docs update rule so the rewritten chapters don't drift again. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The proposals README says abandoned proposals are deleted, so the header check no longer accepts the status. Adds a fixture case. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Name go.work and environment/microvm/go.mod rather than restating the Go and go-microvm versions, and drop the core-package count the table already shows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rewrap prose and one Go comment that the earlier review fixes left over-long, and say that only the listed internal-call slots fall back to cheap (title has no default tier; plan falls back to reasoning). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The architecture overview and deployment chapter now point at the version go.work declares instead of repeating it, so the source-build floor test no longer asserts a literal Go version in those two pages. The other surfaces it checks (AGENTS.md, Taskfile, user-docs, the SDK Dockerfile) still pin it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main moved and deleted user-docs pages and moved content into these docs while this branch rewrote them. This points the rewritten pages at the new user-docs paths, keeps main's operator route and microVM source-qualification pointers, folds in main's reasoning-summary and Anthropic thinking-mode facts in providers.md, and repoints the reflection link on the page that replaced embed-engine.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Go back to main's docs/drafts/ instead of a new docs/proposals/ home, and drop the Status/Owner/Last updated headers and the instruction-files check this branch added for them. The drafts index is main's, plus a row for the surface-migration plan, which this branch moved out of the deleted docs/design/. Root AGENTS.md keeps one line saying drafts are not current behavior. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…comments The ADRs were deleted; 240 comment lines and 59 test names in engine/agent still cited them. Bare citations are removed; citations that carried meaning now state the rule or name the concept (for example "direct-write" instead of ADR 0041/0077). ADR-numbered tests are renamed for the behavior they pin, and adr0291_delegation_test.go becomes delegation_placement_test.go. Two comments described old behavior: the preHook doc said a PreToolUse-rewritten call is not re-authorized, but runOne, the read batch, and approval resume all re-run authorization on the effective call; the parentMutatingCaller doc described a merge-at-end design, but a read-write Subagent edits the parent in place during its run and only a single-branch Parallel call merges. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…omment The ADRs were deleted; cmd/mecatui still cited them in about 150 comments, one test message, 88 test names, and one helper. Citations are removed or replaced with the concept they named; ADR-numbered tests are renamed for the behavior they pin, and adr0296_local_session_context_test.go becomes local_session_context_test.go. embed.go claimed the client package imports no contracts, gRPC, or internal packages; it imports all three. The comment now states the real boundary: only embed, client, and the main package import them, and ui and theme import none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ckage doc The ADRs were deleted; cmd/ (outside mecatui), the smaller internal/ packages, mcp/, authn/, environment/, and perf/ still cited them in about 144 places, including unnumbered "decision N" references and 20 test names. Rules that a citation carried are now stated in the comment (for example the listener-scoped GetServerInfo contract in cmd/mecated), and links to docs/adr/ files point at the current observability and perf-tracking pages. environment/microvm/microvm.go described a "future" runtime; the module holds the libkrun backend and the local lifecycle daemon. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…port comments The ADRs were deleted; the engine core packages, reference adapters, and engine/COMPATIBILITY.md still cited them in 182 places and 46 test names. Citations are removed or replaced with the concept they named; tests are renamed for the behavior they pin, and two ADR-numbered test files get descriptive names (sessnap placement_test.go, prompt agents_hierarchy_test.go). Stale comments fixed against the code: - hookevent.go: a PreToolUse-rewritten call is re-authorized. - evaluator.go: ScopeUser is the lowest configured scope, with the built-in floor below it; an Allow overrides an Ask only when that Ask comes from the built-in floor. - port/doc.go: the offline reference adapters live in engine/adapter. - memfs: read-before-edit evidence lives in tool.ReadLedger, not memfs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…etry and scheduler comments The ADRs were deleted; internal/adapter (outside server/) still cited them in about 240 lines, including wrapped and unnumbered citations, and 100 test names. Citations are removed or replaced with the rule they carried; permconfig field comments keep only operator-facing text because they feed the generated configuration reference. The osfs managed-temp tests share a TestManagedTemp_ prefix so CI can keep selecting them as a group. Stale comments fixed: telemetry/metrics.go said no OTLP metrics reader exists, but newMeterProvider attaches a push reader when a metrics endpoint is set; the ErrFireNowOverlap comment said 409, but the server maps it to 412. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…store comment The ADRs were deleted; internal/app still cited them in 519 lines and 155 test names. Citations are removed or replaced with the rule they carried (for example "listener-scoped deployment policy" and "the model-visible affordance gate"); links to docs/adr/ point at the governance chapter. Tests are renamed for the behavior they pin. build.go said the user-model store "stays LOCAL in Phase B" and pointed at the observability doc. It has no remote driver at all: buildUserModelStore always opens it from a local directory. The comment now says that. Co-Authored-By: Claude Opus 5.5 <[email protected]>
slots.go said only three internal calls are routed to slots and that the subagent router is out of scope. Compaction, ask-reviewer, guardrail, reflection, the router classifier, and the title generator are all routed today; only the synthesis slot has no consumer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…thorization comments
The ADRs were deleted; internal/adapter/server still cited them in 410
lines and 146 test names. Citations are removed or replaced with the
rule they named ("the gap rule", "listener-scoped authority", "the
scheduler fire path"). Tests and six ADR-numbered test files are
renamed for the behavior they pin.
Stale comments fixed against the code:
- The Service doc said approving a session found only in the store
returns ErrNoActiveRun; an approval on a persisted awaiting session
resumes through Engine.ResumeApproval. Only Cancel returns
ErrNoActiveRun, and Cancel's own doc is corrected too.
- The WIRE EXPOSURE comment described a POST /v1/sessions/{id}/approve
route that does not exist. Client approval goes through ResolveRunAsk
(gRPC) and /controls/resolve-ask (HTTP) to resolvePersistedRunAsk;
the legacy path is reached only by ApprovePlan and tests.
- appendEvent said "this phase ships no authorization"; ownership is
enforced when Config.OwnershipEnforced is set.
- Test comments that called /approve a real route now name the path
each test actually exercises.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… deploy The ADRs were deleted; provider/, adapters/, contracts/proto/, the TypeScript SDK, e2e/, deploy/, apps/, .github/, and the root YAML files still cited them in about 270 lines and 38 test names. Citations are removed or replaced with the rule they carried; mecatequi workflow links to docs/adr/ now point at the public mecatequi deployment page, and a proto link points at the subagents-and-teams chapter. Generated code is refreshed in a separate commit. Stale text fixed against the code: - Taskfile api:check and ci.yml said seven core packages; there are eight (engine/learning). - Taskfile test:engine-standalone and ci.yml listed an outdated engine dependency closure. - perf.yml said the baseline is fetched via the raw URL (it uses an authenticated gh api call) and its header omitted the cache-hit and advisory render suites. - user-docs hook-runner.md said the permission policy does not rerun after a PreToolUse hook rewrites arguments; dispatch re-authorizes the rewritten call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI selected the managed-temp tests by their old ADR names, which would have run nothing; ci.yml now selects TestManagedTemp_ and TestManagedModeUnixAdmission. attempt_protocol_test.go asserted the old ADR wording of the attempt repository proto. The capacity work record in docs/proposals names the renamed contextual-guardrail tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Output of task generate and task docs. Comment-only: no generated code or descriptor changed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…file
The per-area sweeps matched "ADR NNNN" on one line and missed
citations split across a line break ("(ADR" / "0068)"). This removes
the 19 that remained in mecatui, the engine, internal/app, cliconfig,
engine/api/README.md, and the user-docs authoring contract, and renames
the last ADR-numbered server test file to delegation_placement_test.go.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's reasoning-summaries change added TestADR_0016_MissingThinkingCapabilityUsesModelFallback; rename it to TestMissingThinkingCapabilityUsesModelFallback like the rest. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s branch's comment fixes Rebasing replayed this branch's comment edits over files that main and the docs branch also changed. Take main's ADR-free wording for the Harness and Schedule protos (and their generated code), keep main's reasoning-capability gate comment and its new test, and keep the docs branch's preHook and learned-rule scope comments, with the scope comment corrected: a learned allow does override an Ask from the built-in floor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A test comment said its pin keeps ac-trace attached to the API contract; the ac-trace tasks were removed. Say what the pin checks. Refs #2119. Co-Authored-By: Claude Opus 5.5 <[email protected]>
rdimitrov
force-pushed
the
claude/stale-code-comments
branch
from
October 7, 2026 20:31
062fd62 to
da0bdd7
Compare
…roposals-e1b1bb # Conflicts: # docs/tui.md
…b1bb' into claude/stale-code-comments # Conflicts: # cmd/mecatui/client/msgs.go # cmd/mecatui/ui/conversation.go # cmd/mecatui/ui/render.go
…/stale-code-comments # Conflicts: # engine/governance/evaluator.go
This was referenced Oct 8, 2026
This branch was successfully deployed
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.
Summary
Follow-up to #2157 (merged). The ADRs under
docs/adr/were deleted in #2105, but about 2,300 lines of code, tests, CI, and config still cited them ("see ADR 0291", "ADR-0036 decision 3",docs/adr/0019-...,TestADR_0291_...,adr0291_*_test.go). Every one of those citations points at nothing. This PR removes them without losing meaning, and fixes comments that describe behavior the code no longer has..github/scripts/instruction-files.py, which blocksdocs/adr/from returning.Commits are split by area (engine/agent, mecatui, cmd and small internal packages, engine core, internal/adapter, internal/app, server, providers/contracts/CI), so each owner can review their own.
Stale comments fixed
Each was checked against the code it describes.
internal/adapter/server/service.go:Servicedoc said approving a session found only in the store returnsErrNoActiveRun. An approval on a persisted awaiting session resumes throughEngine.ResumeApproval; only Cancel returnsErrNoActiveRun. Cancel's own doc is corrected too.POST /v1/sessions/{id}/approveroute that does not exist. Client approval goes through gRPCResolveRunAskand HTTP/controls/resolve-asktoresolvePersistedRunAsk. Test comments that called/approvea real route are fixed as well.appendEventsaid "this phase ships no authorization"; ownership is enforced whenConfig.OwnershipEnforcedis set.engine/agent/dispatch.go:preHookdoc said a call rewritten by a PreToolUse hook is not re-authorized.runOne, the read batch, and approval resume all re-run authorization on the effective call.parentMutatingCallerdoc described a merge-at-end design. A read-write Subagent edits the parent in place during its run; only a single-branch Parallel call merges.engine/governance:hookevent.gorepeated the "not re-authorized" claim.evaluator.gocalledScopeUserthe lowest scope; the built-in floor is below it.evaluator.goalso said an Ask in any scope beats an Allow. A higher-scope Allow overrides an Ask that comes from the built-in floor.user-docs/building/extension-points/hook-runner.md: same correction as the preHook doc, in the public docs: a rewritten PreToolUse call runs the permission policy again.engine/port/doc.go: the offline reference adapters live inengine/adapter, notinternal/adapter.engine/adapter/memfs: read-before-edit evidence lives intool.ReadLedger, not in memfs.internal/adapter/telemetry/metrics.go: said no OTLP metrics reader exists; a push reader is attached when a metrics endpoint is set.internal/adapter/scheduler: theErrFireNowOverlapcomment said 409; the server maps it to 412.internal/app/build.go: said the user-model store "stays LOCAL in Phase B". It has no remote driver at all.internal/app/slots.go: said three internal calls are routed to slots. Six are (compaction, ask-reviewer, guardrail, reflection, router classifier, title); onlysynthesishas no consumer.cmd/mecatui/embed/embed.go: said the client package imports no contracts, gRPC, or internal packages. It imports all three;uiandthemeimport none.environment/microvm/microvm.go: called the runtime "future"; the module holds it.Taskfile.ymlandci.yml:.github/workflows/perf.yml:gh apicall.Left as is
engine/CHANGELOG.mdandsdk/typescript/CHANGELOG.mdare historical records.docs/drafts/: the proposals themselves. The one test name a work record cites is updated.7c7206e8dstill resolve:mecak8s.md,mecated.md,mecatequi.md,grpc-api.md,http-sse-api.md..claude/that listdocs/adr/among places to look.Follow-ups
docs/architecture/mecatl.modelith.yamlcites ADR 0022, 0030, and 0038 in six places. The rendered.mdmust be regenerated with the pinned modelith revision, which needs access to the private module, so the YAML is left untouched here.microvmmanager/manager.go,server/placement.go, andcmd/mecatui/ui/update.go, so all three need to change together. That's a behavior change, not a comment fix.Verification
gofmt -lclean,go vetclean in every module touched, and every renamed test run by its new name (Go and Vitest).task generateandtask docs: matlatl reports 0 broken links or anchors, 0 orphans; instruction files OK.task site:build: success.task lint: 0 issues across all modules.task test:race: the same 46 tests fail locally with and without this branch (git worktree forking, native shell, Kind qualification, TLS, and microVM development-build tests on this macOS machine). The failing sets match exactly, so none comes from this change; CI is the reference for those.🤖 Generated with Claude Code