archie-core-8cda.6.5's remaining half. The gate landed in a7d6cc8c; what was
missing is the verification that the extracted service actually carries a message.
It drives the deployed path -- compose, the real webhook adapter, a real listener,
a real signed HTTP request -- and asserts on what crossed the chat contract as well
as on the reply the caller receives back, which DeliverTo=origin routes through
that contract. The envelope assertions are the three transport facts this channel
must carry, each of which has a reason recorded elsewhere: platform "webhook" is
how the Gateway learns which channel it serves (archie-core-c1qx); SenderID stays
empty because a route path is a source and never a person (archie-core-oyna); and
the route survives as the budget key, so the inbound limit still applies.
Webhook is the only channel a test can own. Telegram needs a bot token and the
Telegram API, email needs SMTP, so neither can be exercised here. The PRD's fourth
criterion asks for a live Telegram round trip "or equivalent channel smoke test",
and this is that equivalent: every step between the POST and the contract is the
deployed code path. The gRPC hop beyond the contract is covered by
internal/infrastructure/gatewayrpc's conformance tests, which run the same client
and server in both local and remote mode.
Red-proofed rather than assumed: signing the request with the wrong secret fails it
with "status = 401, want 200", so the signed path is genuinely exercised rather
than bypassed.
Also carries f39fdd73, the migration register's correction, which was committed
unpushed on purpose so it would ride a code change rather than re-stamp :latest on
its own.
Verified: task check exit 0.
The register described a design written before any measurement existed, and two of
its open questions were answered while landing archie-core-1ng1 -- both by
measuring rather than by preference. The client did not become two packages: the
workflow and persona watches stayed on internal/app/controlplane's Client, which
now embeds the new one, so the daemon's validated watch is still defined once and
the read path still has one implementation. And the vocabulary stayed in
internal/infrastructure/controlplanerpc rather than moving to a domain package,
because it has exactly one consumer and the store-backed side reads the same
definitions through type aliases rather than a copy.
It records what made that safe rather than asserting it: internal/app/controlplane
was the ONLY direct import of the Messaging Service that dragged a banned runtime
-- gatewayrpc, staterpc, applystatus, messaging, configuration, readiness and health
were all clean -- so severing that one dependency sufficed and no third package was
needed. The workflow/task exception the gate carries is recorded too, with the
verification that justifies it rather than the precedent alone.
Two questions stay open and named: whether the store-backed server also leaves
internal/app/ (archie-core-8f4n), and whether internal/domain/workflow's
contract/engine split happens (archie-core-inh6). Promoting the vocabulary to a
domain package is recorded for the day a second consumer appears.
Committed without pushing on purpose: a docs-only push to main republishes :latest
with a dev stamp for no benefit (archie-core-i5nb), so this rides with the next code
change.
The PRD's deletion gate for the Messaging Service could not pass: go list -deps
./cmd/archie-messaging linked modernc.org/sqlite, internal/store,
internal/domain/workflow and internal/agentexec -- all through one import,
archiemessaging/run.go -> internal/app/controlplane, from which the service used
three symbols. The decision was to sever rather than amend the gate, because a
boundary you whitelist around is no longer a boundary (archie-core-1ng1, recorded
in docs/architecture/migration-decisions.md).
Measured before touching anything: internal/app/controlplane was the ONLY direct
import of the service that dragged those runtimes -- every other one was clean --
so severing this one dependency is sufficient for the gate.
Moved into the new internal/infrastructure/controlplanerpc: the generic resource
client (NewRPCClient, Query), the RuntimeChatConfig projection, the reader
interface (now the exported ResourceReader), the wire sentinels, the status
mapping (now ClientError), and the channel-settings document with its decode --
ChannelSettings, TelegramSettings, WebhookChannelSettings, EmailSettings,
RateLimitSettings, ChannelDuration, DecodeRenamingLegacyKeys.
internal/app/controlplane keeps the store-backed server, the Definition registry,
every kind's seed/validator/Normalize, the schema derivation, and its
resource-specific reads and watches. Its Client embeds the new one, so the read
path has one implementation while the workflow, persona and cronstore reads stay
with the processes that already link those engines. The documents are type-aliased
back into this package so the store-backed side reads them by the names it has
always used: one definition, not a copy on each side of the boundary.
The gate is now enforced by cmd/archie-messaging/architecture_test.go, measuring
the linked binary against the PRD's banned list, with one exception checked in
both directions: internal/domain/workflow/task, the Task status and view
vocabulary whose own dependency set holds none of the banned runtimes. The UI gate
carries the same entry for the same reason, and the fleet skill names it as the
precedent.
Verified: task check exit 0. The gate was red-proofed twice -- banning
internal/channels fails it, and removing the workflow/task exception fails it --
so neither the loop nor the exception is decorative.
archie-core-8cda.6's fourth criterion cannot pass: the PRD's deletion gate for the
Messaging Service does not exist, and the check it names reports four banned
packages linked -- modernc.org/sqlite, internal/store, internal/domain/workflow and
internal/agentexec -- all through one import, archiemessaging/run.go ->
internal/app/controlplane, from which the service uses three symbols. The decision
is to sever rather than amend the gate, because a boundary you whitelist around is
no longer a boundary.
This records the plan before any implementation: what moves (every kind constant,
the channel-settings vocabulary and its decode, the generic client, the persona
watch, the workflow-settings document), what stays and why (the store-backed server
and Definition registry, WorkflowDefinitionsClient and stepRegistry,
WatchWorkflowExecutionSettings because decodeSettings returns and validates
workflow.ExecutionSettings, the schedules document because a domain vocabulary may
not import infrastructure, the schema derivation), and where the pieces go
(internal/domain/controlplane for the vocabulary,
internal/infrastructure/controlplanerpc for the client, mirroring gatewayrpc and
staterpc).
Four decisions are named rather than taken, so archie-core-8cda.6.5 does not
inherit them: whether the server also leaves internal/app/; where
WatchWorkflowExecutionSettings lives, given it cannot share a package with the
client the Messaging Service imports; whether internal/domain/workflow's
contract/engine split happens and when; and whether archied's watches move with the
client. Both existing consumers keep compiling, and the Messaging Service's
dependency set loses all four banned packages.
Verified: task check exit 0, docs-only change, docs:check and docs:prds green.
An unauthenticated document request answered with a plain-text 401 -- and
index.html, the bundle and every asset sit behind requireToken -- so a
bookmarked or bare URL was a dead end: the dashboard's own authentication
banner could never load to explain it. Document requests now get a
self-contained 401 page whose one-field form reuses the ?t= exchange, so a
pasted token sets the cookie and the redirect lands on the dashboard. A
rejected token re-renders the page with the reason instead of answering a
document with text.
API and event-stream callers keep the plain-text 401: classifyActionError maps
it to "session-expired", and an EventSource error body is never seen.
The auth banner gains a Retry that re-runs the reads which report their own
401s, so a recovered session clears it without a document reload. The retry is
extracted to lib/session-retry.ts with an in-flight guard and unit tests.
The bead behind this is already satisfied on main -- install.sh renders no TOML,
splices nothing, calls the archied binary it just built for a fresh install,
leaves an existing config alone, and fails loudly rather than writing a partial
one. What was missing is that nothing checked any of it, which is how the
generating branch grew back the first time it drifted: it hardcoded the GitHub
token key and the Gitea host, so choosing Gitea produced a config naming a token
the installer never wrote (archie-core-1786637491134-51-17a55e60).
TestInstallerDelegatesConfigGenerationToArchiedSetup now pins all four, with the
splice and redirection checks scoped per line so a legitimate sed or awk elsewhere
in the installer stays allowed. Red-proofed in both directions: re-adding a forge
table fails with "install.sh carries a TOML template", and re-adding a sed splice
on config.toml fails with "install.sh splices config.toml".
The non-interactive arm of the criterion was verified by running it rather than
reading it: the exact invocation install.sh builds, with stdin closed, exits 0 and
writes a config the real loader accepts. That run also surfaced a separate defect,
filed as archie-core-6omt rather than folded in here: the cloud path pairs the
ollama baseline model with provider openai, so an unattended install names
openai/llama3 -- loadable, but not a model OpenAI serves, and it fails at the first
chat turn long after the install reported success. Fixing that needs a decision
about where an attended-free install gets its model, so it is not a patch.
Verified: task check exit 0 including test:tools and test:ui.
The menu and /help were generated from a hand-maintained spec list that had
drifted from the executable surface: /approve and /deny are real handlers but
were published nowhere, while /rollback and /stop are Telegram-only.
Registration now reads a single handler table, and a regression test derives
the executable set from messaging.LocalCommands() plus that table, failing when
the published specs and the executable surface disagree in either direction.
/approve and /deny are published with their Telegram meaning, the
dangerous-command approval list, not the shared task-approval copy; that split
is archie-core-ho86. The two tests that pinned them as hidden commands are
updated to the published decision. /help now also asserts it carries every
published command's description, not only its usage.
The v1.30.0 extraction moved Telegram, email and webhook out of archied and into
cmd/archie-messaging, and nothing packaged it. dist-zip built and copied only the
five older binaries, and scripts/archie-update-install omitted it from both its
service and binary lists. A host upgraded across v1.30.0 therefore ran on with no
messaging process at all: archied logged that it stopped serving the telegram
gateway at the extraction, nothing replaced it, and the bot was dead for two days
with no error anywhere -- the daemon looked healthy throughout (archie-core-1c01).
Fixed in all four places the host component set was enumerated: the zip's build
loop, the zip's copy list, the installer's GATEWAY_SERVICES (messaging is a
service, so it is installed AND restarted) and its GATEWAY_BINARIES. The comment
claiming every process in the documented deployment ships in the zip is now true,
and says what makes it true.
The duplication was the actual defect, so the sets are pinned to cmd/ instead:
TestHostCommandListsCannotDrift derives the host-run commands from cmd/ and
asserts all four lists, plus the reference runbook's units, agree with it. Adding
a command or extracting one fails the test until it is packaged -- the check that
would have caught this on the day. The installer's own test grew the same
coverage, and the reason it passed while the bug was live is worth recording: its
fixture created only the stale cmd/ set, so the script's `[ -d ./cmd/$cmd ]` guard
silently skipped messaging.
Documentation, because the installer now refuses an update when a service unit is
missing and sends the operator to the runbook -- so a service the runbook omits is
a dead end: a messaging unit in deployments/systemd-user-service.md, the component
list and start sequence in deployments/INSTRUCTIONS.md (which ships inside the
zip), and the packaged-binary list in RELEASING.md.
Verified: task check exit 0, including test:tools and test:ui. Both new guards
were made to fail on purpose: reintroducing each omission produces "missing
archie-messaging" and "no call with fragments [./cmd/archie-messaging]".
The landing page opened by defining archied against a category the reader
never raised, then listed security features. State what the daemon does
and who owns git operations; drop the contrast.
Derive a public news page and one release-notes page per component version
from CHANGELOG.archied.md and CHANGELOG.archie.md, the notes the release
process already freezes.
- tools/newsgen writes docs/news/releases.json, the canonical artifact a host
renders from, plus the MkDocs pages. Check mode fails when the committed
files lag a changelog edit, and runs in task check; tools/release.sh --tag
regenerates and stages them in the release commit, skipping files already
current.
- mkdocs.yml keeps the version pages out of the derived navigation without
excluding them from the site.
Add the playbook_dispatches at-most-once ledger (docs/prds/eda-playbook-engine.md
gap 2) and the record-then-invoke coordinator helper, with the cross-process
plumbing the State Store boundary requires.
- proto: RecordPlaybookDispatch and DeletePlaybookDispatches RPCs (string keys)
- storecontract: PlaybookDispatcher interface (no *sql.Tx, reuses ErrAlreadyDispatched)
- store: playbook_dispatches table + INSERT OR IGNORE dedup + delete-by-playbook
- staterpc: client/server methods and Deps field; error sentinel survives the hop
- eda/playbook: InvokeOnce record-before-invoke helper, keyed on
(playbook, version, event, action) with a "1" action-position fallback
The ledger is administrative-only: task-scoped grants never reach it, matching
TaskGrants' Update/Transition/InsertEvent allowlist. Not wired into the daemon
workflow pin; the production call site arrives with the first side-effecting
position.
Replace the per-form actions select/index special-casing with one AST
visitor that counts actions identifier nodes and statically-resolvable
accesses. resolvable = (identCount == staticCount): any actions read not
consumed by a static access (non-literal index, in operator, size, bare
actions, equality) now fails playbook load instead of slipping through to
a runtime miss.
One Router serves every channel and named itself "web", so Source.Platform -- the
FIRST component of the session natural key, and the platform GetByChannel filters
on -- was a constant, true of no channel but the dashboard. Two consequences
followed: the per-user identity policy was real code that no production call site
reached with a real channel name, and a curator pass's write to agent-user memory
could not be read back by the turn that wrote it, because that turn resolved no
UserID.
The channel now travels with the message. Frontends name the channel they carry
(pb.Message.platform: telegram, email, webhook, web), and the Gateway stamps the
session from it, falling back to its own name when a sender names none -- which is
what every existing row holds and what a frontend that does not participate keeps
doing.
Identity resolution reads the platform off the inbound rather than closing over a
channel name, so carriesPersonIdentity finally decides something in production:
telegram and email resolve a person, the dashboard and a webhook resolve nothing,
and an unknown platform fails closed.
Deliberately NOT changed, because it is where this could quietly widen scope:
TurnRunnerConfig.Channel still keys tool availability, so no channel gains or
loses a tool here. Only session lookup and identity follow the message's platform.
Consequence the maintainer accepted: a chat whose active session came from /new or
/branch re-resolves once, since GetByChannel now filters on the channel's name. A
chat with no /new re-resolves onto the same deterministic session id and heals
silently.
Verified: gateway, archied, gatewayrpc, messaging, webui, channels and cmd suites,
go vet ./..., go build ./..., golangci-lint run ./... (0 issues), docs:check.
New contracts: TestResolveSessionKeyStampsTheMessagesPlatform, the per-platform
identity table, and the transport-context wire round trip.
The schedules document stored interval as a bare time.Duration, so its JSON was
the nanosecond count -- 1800000000000 for thirty minutes -- and the Web UI, which
now derives field metadata from the document type, correctly rendered a number
input. Same defect 02rm fixed for rate_limit.window, in the second stored time
this tree has. Nobody should be asked for a count of nanoseconds to configure a
schedule.
cronstore.Duration writes the string time.ParseDuration reads and reads that, a
nanosecond count, and nothing else: every schedule stored before this shape
existed carries a count, in both the control plane's schedules resource and this
package's own jobs table, which persists the spec as JSON. A value that parses as
neither is refused rather than decoding as zero, because a zero interval is a job
that never fires.
The derived schema needed no change and gets it for free -- which exposed a fix
the derivation itself needed: it classified durations by NAME, so cronstore.Duration
derived as an integer. durationLike now asks the type instead -- does it expose the
standard duration, and does it marshal as a quoted string -- so the next duration
type is classified correctly rather than silently rendering as a number box. That
failure mode was invisible until a live daemon showed it.
normalizeSchedules already re-marshals, so a stored document converges on its next
write while reads keep tolerating the count.
Verified: cronstore, crondelivery, controlplane, scheduling, webui and archied
suites, go vet ./..., go build ./..., golangci-lint run ./... (0 issues),
docs:check. Against a live daemon (8484): the catalog serves schedule.interval as
{type: string, format: duration}.
Inspector, Bindings and Mappings were three sibling destinations in a
dropdown, for what is one chain read in order: an event, the mapping that
names its fields, the binding that decides what runs. They are now three
tabs on /events, and the bar carries Events as a link rather than a menu
with one child sharing its name.
The navigation entry is always live and the tabs prune themselves: each is
a separate capability, so a composition that can back only some of them
still reaches the ones it can, and an unreported section stays visible.
Which tabs exist, and which one is showing, lives in tab-selection.ts and
is unit-tested without a browser; the page owns the components and the
address bar. The old paths survive as bookmarks that redirect to their tab,
so a link or a learned URL still lands somewhere that works.
Three pages become tab panels: they lose their page-level headers -- the
page names the page -- and keep their own actions in a right-aligned row.
CapturesHeader.vue is absorbed into the Inspector panel, which is where its
stream status belongs.
Five files named a specific host's service and the port it holds as the
reason a deployment might move the state store's listen address, including
config.example.toml, which ships to every operator. The guidance keeps its
point -- move the listen/target pair together when a port is already taken
on the host -- without naming a service the reader may not run, or have
heard of.
Also corrects the Taskfile's dev-stack summary, which still described the
state store as binding 127.0.0.1:9090. deployments/dev.toml pairs it with
9091, and has since the pair became configurable, so the comment described
a stack that does not start.
Repo.BaseBranch() is where an empty base means "main", and the daemon
handed the raw field to worktree.Prepare -- the one call site that did,
beside the workflow step that passes the mapped value. A repository stored
with no base therefore reached git with "" and its branch was never cut
from main.
Reachable now because the document editor stopped prefilling base (its
per-path skeletons retired in aa650e2c), which had been masking the missing
mapping rather than fixing it (archie-core-lwzd).
The guard is a wiring invariant in architecture_test.go: it walks the
package for the worktree.Prepare call and refuses the raw field, and fails
if the call is gone rather than passing unchecked.
schemaFixture covered config.Duration and channelDuration, both of which marshal
as the string time.ParseDuration reads, but not a bare time.Duration, which
marshals as its nanosecond count. The derivation already distinguishes them by
named type rather than by kind; this pins it, because the failure mode is a
client rendering a text box for a number, and the schedules document has exactly
that field (cronstore.Schedule.Interval).
The control-plane descriptors now derive a JSON Schema from the Go type of
the document they describe (a19cd24b), and nothing consumed it: the editor
rendered dashed keys, guessed no format, and synthesised a new row from a
literal skeleton per array path.
A pure reader (settings/resource-schema.ts) resolves the schema node for an
editor path -- nested keys, array items, and a keyed collection's
additionalProperties -- and the editor uses it for labels (title ahead of
the dashed-key fallback), a duration placeholder, a hint when the schema
carries prose, and the shape of a new row. A descriptor with no schema, or
one describing nothing, renders exactly as before.
Deletes ControlPlaneResourceCard.vue: 121 lines, zero references, the
abandoned schema-driven card and the only other consumer of schema_json.
task fmt is not a formatter: it runs go fix to a fixpoint and then
golangci-lint's formatters, so a package can be gofmt-clean and still
go-fix-dirty. The merge train's full gate on a19cd24b caught exactly that and
rewrote this file -- reflect.TypeFor[T]() in place of reflect.TypeOf(T(0)), the
t.Fields() iterator, and maps.Copy over a manual key-by-key copy.
Adopted verbatim; formatter output is law here. The remaining stages of that
gate ran against this content, so it arrives verified rather than merely
formatted. The author's scoped gate could not have caught it: gofumpt and
golangci-lint fmt agree with the original text, and only go fix disagrees.
Twelve definitions each advertised a bare {"type":"object"} or {"type":"array"},
so no resource descriptor carried a single field: the Web UI had nothing to
label, describe or format a field with, and the one component that parsed a
schema was dead code. The constants could not be kept honest either -- a schema
written beside a struct drifts the moment a field is added, and nothing compares
the two.
Definition now names its document type and Descriptor derives the schema from it.
json tags give the keys, falling back to the Go field name because that is what
encoding/json stores; the Go type gives type and format; and a field's own
title, format and doc tags override. A duration is a string with format
"duration", which is how every duration field in the catalogue -- poll_interval,
max_uptime, rate_limit.window -- gets a client-side affordance from one rule
instead of twelve hand-written ones.
Deliberately structural: it emits no prose of its own. Field descriptions already
have one home (internal/webui/config_schema.go, keyed by dotted config path), and
a second would be two places to keep the same fact true. It also never emits
"required", because an empty string is legitimate for nearly every field here --
a blank workspace, a disabled rate limit -- so requiring most of them would
invite a client to enforce something the document does not mean.
Guarded by TestEveryResourceDescriptorDerivesProperties, which walks the catalogue
the production constructor builds and fails if any kind describes no fields --
the assertion that would have caught all twelve. It accepts a keyed collection's
additionalProperties as described, because a map document has no fixed keys.
Verified: controlplane, workflow, webui, archieui and staterpc suites, go vet,
go build ./..., golangci-lint run ./... (0 issues), docs:check.
boot.prReviewer returns nil without a worktree manager, and a nil reviewer
omits review_pr from every channel's tool set. RunGateway never called
buildTreesAndIdentities, so the Gateway resolved a nil reviewer and no
channel could review a PR.
Extract the manager's construction into boot.buildWorktreeManager, called
by buildTreesAndIdentities (daemon, unchanged field-for-field) and by
startGatewayRuntime before setupGatewayChat. The Gateway does not call
buildTreesAndIdentities: that also registers daemon identity runners the
Gateway must not own, and PR review only needs a clone of the PR head,
which worktree.Manager.CheckoutPR does from the forge.
Pin the ordering by source position in composition_order_test.go, alongside
the memory-engine ordering the same function already carries, and pin both
compositions behaviourally in worktree_manager_composition_test.go: the
Gateway's step must yield a reviewer that advertises review_pr, and the
daemon must still build its root manager plus one runner per identity with
a distinct WorkDir.
Correct docs/prds/operator-pr-review.md, which still asserted the daemon
supplies ChatPRReviewer and holds the review in-flight set.
The channel-settings resource embedded internal/config types directly, so the
document the Web UI edits was a JSON projection of TOML-tagged structs:
encoding/json fell back to Go field names, and rate_limit.window was a bare
time.Duration. An operator saw "Window" over a field expecting a nanosecond
count -- 60000000000 for the window = "1m" the file example writes -- and
"ListenAddr" over the email addresses, while every sibling resource in the same
registry is snake_case.
Define the shape here instead: emailSettings and rateLimitSettings with explicit
tags, and channelDuration, which writes the string the file accepts and reads
that, a nanosecond count, and the Go-cased keys an existing store holds.
Reading a legacy document is deliberate, so it stays strict about everything
else. decodeRenamingLegacyKeys renames the four known legacy keys and keeps
DisallowUnknownFields, because swallowing an unknown key decodes as "unset", and
an unset rate limit is off -- the failure this shape exists to end. A
misspelling is refused.
normalizeChannels, through the Definition.Normalize hook schedules already uses,
rewrites a legacy document into the current shape on write, so a stored document
converges the next time it is saved. Reads tolerate it until then, so no
deployment has to re-save before the document can be read.
Verified: the controlplane, messaging and configuration suites, archied (the
loadRuntimeConfig consumer), go vet, go build ./..., golangci-lint run ./..., and
docs:check. The full task check is the merge train's, on this tip.
The same audit found container-runtime-policies embedding config.ContainerConfig
(seven fields, no json tags); tracked separately rather than folded in here.
The sender drove only the capture intake, which is the one inbound path a
config change cannot break. It now also signs a GitHub issue delivery for
[forge].webhook_addr: X-Hub-Signature-256 over the exact bytes, the event
header, and optional --assignee/--label so the payload can satisfy a
bot-user or label trigger. The signature is the same digest
webhookguard.VerifyHMAC computes, so a refusal here is the receiver's
policy rather than a mismatch in the tool.
--url now names the intake a send goes to (dashboard for capture, receiver
for --forge) and --api names the dashboard for the read-back, which is a
different host once the receiver has one of its own.
The rule belongs in CLAUDE.md, the inventory belongs in the config skill. The
skill already carried a decoded-but-unwired ledger and defines its status terms
exactly, so the entry now points at it instead of duplicating it, and the ledger
gains the live instance from 2026-09-22 (per-identity forge intake) plus the
three shapes an unwired field can take - not-consumed, not-projected, and
deliberately-not-projected, the last being UpdateCheckCommand/UpdateInstallCommand
read from base by design.
Section 1 attributed the PullRequestReader type-assertion to the daemon while
section 4 now correctly says the Gateway serves review_pr, and the Files list
cited internal/app/archied/telegram_setup.go, which does not exist. Both found
by the cp-gwreview lane and left by it as out-of-scope staleness.
IdentityConfig.Forge is the same type as the root [forge] block, so
[identities.forge].intake, .webhook_secret and .webhook_addr all decode --
but every intake read is of the root block (validate.go,
bootstrap.setupForgeWebhook) and per-identity intake never reached
validateForgeIntake. The setting parsed, was ignored, and was not even
validated. Separately, root intake = "webhook"/"both" with [[identities]]
started the daemon, logged "forge webhook disabled" and polled instead.
Extend validateForgeIntake to fail closed on both shapes: a per-identity
webhook/both intake (or webhook_secret/webhook_addr) is rejected naming the
identity, the setting and the reason, and root webhook/both intake alongside
[[identities]] is rejected naming both settings and the supported
alternative. Poll and empty stay valid per identity; the two shipped forge
profiles still validate.
archied now speaks sd_notify(3): READY=1 at the moment the process declares
itself serving, and WATCHDOG=1 heartbeats while the run loop's own progress
marker is fresh. The heartbeat is licensed by that marker (daemon.LastPollAt,
stamped at the start of every poll pass) rather than by an independent ticker,
so a loop wedged inside a pass stops being reported as alive and trips the
unit's watchdog.
The protocol is three environment variables and one datagram per state, so it
is spoken directly with net.DialUnix instead of through a new dependency.
Without NOTIFY_SOCKET nothing is sent, nothing is logged, and startup is
unaffected.
The rate-limit budget's runtime owner is the channel-settings control-plane
resource, which the Web UI edits and which boot.loadRuntimeConfig layers over
the file before boot.startRateLimiter reads it. [chat.rate_limit] is that
resource's seed, not its authority.
1fe4691b's comments and commit message described the file key as the thing that
documents a webhook's per-route budget, which is the pre-migration framing.
Cite the resource and the layering instead, and say plainly that editing the
file does not change a stored value.
Three defects in one session landed the same way: a map field the file overlay
dropped (xrux), a field missing from the control-plane projection
(parallel_tool_calls), and per-identity forge.intake - accepted TOML that no
consumer reads, and which is not even validated. The entry names the shape,
gives the live example with file:line, and points at
docs/architecture/configuration.md as the config authority.
A webhook set SenderID to its configured route path. The turn path reads that
field through a per-channel resolver which refuses webhook, but the session
curator derives its participant from the raw field with no channel filter, so a
webhook session with exactly one distinct sender and one extracted fact wrote
agent-user memory addressed to User: "/hooks/...". Nothing reads it, and every
pass added more, because the facts are identical strings with no dedup.
docs/prds/memory-engine-unification.md criterion 7 requires that a route path
never become a user identity.
Clear it at the producer rather than teaching every consumer which channels are
lying: a route path is a source, not a person, so it no longer enters SenderID.
It still keys the inbound rate limit, where it is the documented per-source
budget for webhooks (config.RateLimitConfig), so it travels in the new
transport-only Inbound.BudgetKey -- carried on the wire beside Page, never
persisted, and never read as an identity.
pb.Message gains budget_key (field 9) for the same reason page (field 7) exists:
transport context that rides with an inbound message and is deliberately absent
from storedProto's rendering of a canonical record.
The curator needs no change. An empty SenderID already fails closed as an
unidentified user message, which is the path a dashboard session takes, and
sessionParticipant's existing skip covers it; the test name now says so.
Three claims the reconnect loop records were false, and one boundary was
unpinned either way.
The claim that a store which "stalls until its read times out" is charged and
climbs the ladder described a timeout this code does not impose: nextUpdate
waits on the stream and the loop's context, and never on a clock, so a peer
that accepts the stream and then never answers it ends nothing here and is
charged by nothing here -- a probe held the read open for 2s with no retry
logged at all, and the attempt that finally ended was read as healthy. What
ends that stream is the transport's client keepalive on
internal/infrastructure/staterpc/dial.go (Time 10s, Timeout 5s), which the
watch rides because bootstrap takes its control-plane client off the
*staterpc.Client that dial returned. The comment now states that, names the
file, and states this loop's own boundary: it charges only attempts that END.
"The rule reaches every shape" was false for the shape it was argued from. The
window is derived from the delay the attempt would be charged (four times the
minimum at the minimum rung), so a stall at or past it -- 1s and 1.1s were
measured -- is read as a store that answered on every attempt and pins the
ladder at 250ms, against [250ms 500ms 1s 2s] at a 500ms stall. The comment now
says the reach stops at the window, and why that is deliberate rather than a
gap to close: the stalled attempt lasts the window, so those reopens are under
one a second against the four a second the rule exists to charge.
TestKeepWatchTreatsAStallPastTheWindowAsAStoreThatAnswered pins it, at a
five-minimum stall against the four-minimum window (widening the window past
the stall fails it).
The rule's sentence said "outlived a window", which the operator (>=) does not
mean, and a verification pass confirmed >= -> > survived the whole package. The
comparison stays inclusive and the sentence now says so: an attempt still open
when the window closes is a store that answered. The load-bearing inequality is
the other one -- the window is a strictly wider multiple of the charge, so a
store that fails as slowly as the charge is still charged -- and
TestAttemptHealthyAtTheWindowBoundary pins both edges at every rung: equal to
the window is healthy, a nanosecond inside it is charged.
TestKeepWatchChargesAnAttemptThatEndedWithNothing's window case now stands open
past the window rather than for exactly it: its sleep starts before the loop's
attempt does, so an attempt measured against it could be judged a hair early,
and the exact edge is pinned without a clock by the new unit test.
TestBothWatchStreamsRunThroughTheReconnectLoop asserted only that the name
keepWatch appeared, so a launch site handing the loop a wait of its own was
invisible -- the persona site's wait has no behavioural test at all. It now
reads the wait argument of each keepWatch call (changing it fails the test, and
nothing else in the package does).
No upper bound was added for the wait itself: the injection seam replaces the
wait in every test that drives the loop, so a bound on waitFor's own duration
would have to be a wall-clock one, and the correct code overshot a 25ms timer
to 65ms on a saturated 16-CPU box (169/200 samples over 1.5x, 8/200 over 2x),
which is exactly the flake a bound tight enough to catch the 2x mutation buys.
The wait doc states what the injected wait can and cannot show.