27 Commits
Author SHA1 Message Date
sam 061227708d chore(release): remove the canary, release news, changelog and Woodpecker pipelines (#1917) 2026-11-13 02:35:59 +11:00
sam b509397e8d build: add task dist, build the dashboard once, cache Go in image builds
`task dist` builds the binaries release.json names into dist/ with the
compiler flags `build` uses, so after the gate has built bin/ it only links.
`build` is now static (CGO_ENABLED=0), like what ships.

`ui` runs once per task invocation: check built the dashboard, then build's
dependency built it again under the Go steps that embed it.

Both Dockerfiles compile with cache mounts for Go's module and build caches.
2026-11-10 10:56:12 +00:00
sam 85b21578d8 ci(release): name the missing DEPLOY_TOKEN before checkout, and list what a mirror needs
Quality / check (push) Successful in 3m46s
deploy / gate (push) Successful in 4m29s
deploy / archied-image (push) Successful in 2m53s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
Refs #1788
2026-11-05 00:33:18 +11:00
sam 2f8076d7f8 fix(access): forbid clause scopes the canary grant against its developer role (#1727)
Quality / check (push) Successful in 3m37s
deploy / gate (push) Successful in 4m45s
deploy / archied-image (push) Successful in 2m53s
deploy / agent-image (push) Successful in 10s
deploy / dist-zip (push) Skipped
Service accounts created through the identities API are assigned the
developer role in the request's org, whose shipped policy permits read and
write across the org -- the permit alone did not scope the canary. Install a
matching org-canary-grant-forbid policy (access.CanaryGrantForbidPolicy) that
negates exactly the permit's surface for the canary identity; a forbid wins
within the level, so the role can no longer widen access. Engine tests pin
the surface with the principal carrying the developer role, and the
rehearsal now proves it live: the scoped token gets 403 on /api/access/policies
and 200 on /api/chat/update, and the full canary loop runs on it.

task check passes; task canary:rehearse green (REHEARSE_EXIT=0).
2026-11-02 06:23:38 +11:00
sam c180a2debb feat(access): scoped canary grant replaces instance-admin CANARY_TOKEN (#1727)
Quality / check (push) Successful in 3m49s
deploy / gate (push) Successful in 4m48s
deploy / archied-image (push) Successful in 2m55s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
The canary now authenticates as a dedicated service-account identity in the
system org whose only grant is access.CalaryGrantPolicy: read the signal
endpoints (chat update, alerts, logs, tasks), read and write the
update-settings resource, and trigger an update install. CANARY_TOKEN no
longer carries instance admin; DEPLOY_TOKEN stays CI-only.

- authorize: POST /api/chat/update/install and /defer map to
  update on Object::"update" (dashboard) instead of run on any workflow,
  so the grant can cover installs without granting workflow runs
- accounts: active service-account identities may authenticate with bearer
  tokens (CanAct), not just users
- new POST /api/identities/{id}/tokens (behind manage_identities) mints a
  token for a named non-user identity; new AccountService RPC
  BindIdentityPersonalToken backs it remotely, refusing user-kind targets,
  with the caller recorded as audit actor
- engine tests pin the grant's exact allow/deny surface

RELEASING.md documents the one-time setup. task check passes on this tree.
2026-11-02 06:03:41 +11:00
sam 5356745968 fix(releaseupdate): address review findings on the #1725 canary change
Quality / check (push) Successful in 3m39s
deploy / gate (push) Successful in 4m28s
deploy / archied-image (push) Successful in 3m11s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
- one shared UpdateStateDir() resolver for daemon and dashboard, instead of
  two copies that could drift
- the recovery path for a committed/rolled-back journal writes
  installed.json too, so a crash after the outcome phase cannot lose the
  install record
- JudgeCanaryNow is the explicit signals-only entry point for promoting
  without the window, replacing the zero-install-time sentinel
- canary version comparisons use IssuedAt, matching Promote's replay rule,
  so semver/issued-at divergence cannot wedge check red; queuedBehind
  reuses the judgeable predicate instead of a looser check
- promote prints the channel/pin; promote.yml cancels superseded runs
- canary card: no duplicated elapsed rendering, channel row waits for the
  settings resource instead of showing a default, agent fallback '?'
- rehearsal script bounds its docker build/push/run calls

task check passes on this tree.
2026-11-02 02:45:26 +11:00
sam 5b5059615b feat(releaseupdate): judge the installed release, window from install (#1725)
Quality / check (push) Successful in 4m2s
deploy / gate (push) Successful in 4m31s
deploy / archied-image (push) Successful in 3m14s
deploy / agent-image (push) Successful in 11s
deploy / dist-zip (push) Skipped
The canary window now counts from when a release is installed on the host
(installed.json / installed_at in the update snapshot), not from the
statement's issued_at, and 'release canary check' judges the release the
canary actually runs via its exact-pin tag instead of the moving next tag.
A newer release on next queues behind the one being judged instead of
restarting the clock, so stable moves once per release.

New subcommands: canary status (read-only state, signals, verdict), canary
promote (promote now when hard checks pass), canary unpin (back to next),
and start -force. A held/pinned canary is verified installable every check
and a stranded pin fails the run red instead of looking green. Rollback
pre-flight checks stable's zip and agent image digests before pinning.
Relative signals are judged whenever both windows carry minimum data, so a
breach rolls back mid-window; promote still needs the full window unless
the operator promotes early (new promote.yml workflow_dispatch). The window
is configurable via -window / CANARY_WINDOW.

Also: dashboard canary status card (ui), and task canary:rehearse, a local
end-to-end rehearsal of publish -> canary start -> status -> check ->
promote against a throwaway registry and host.

task check passes; rehearsal run green (REHEARSE_EXIT=0).
2026-11-02 01:15:29 +11:00
sam 0e931485a0 docs(releaseupdate): use contractions in the release and canary text (#1716)
Quality / check (push) Successful in 7m33s
deploy / gate (push) Successful in 6m27s
deploy / archied-image (push) Successful in 2m57s
deploy / agent-image (push) Successful in 12s
deploy / dist-zip (push) Skipped
2026-10-31 22:18:57 +11:00
sam 2181b5fd08 ci(deploy): move the images' :latest only when a release is promoted (#1716)
Quality / check (push) Successful in 3m47s
deploy / gate (push) Successful in 6m29s
deploy / archied-image (push) Successful in 2m59s
deploy / agent-image (push) Successful in 10s
deploy / dist-zip (push) Skipped
2026-10-31 21:48:10 +11:00
sam a4a7c96da6 feat(releaseupdate): publish to next and promote to stable only after a canary evaluation (#1716)
Quality / check (push) Successful in 3m49s
deploy / gate (push) Failing after 16m14s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped
2026-10-31 21:39:32 +11:00
sam 9d8f364af1 feat(releaseupdate): signed OCI distribution sources for releases and the catalogue (#1715)
Quality / check (push) Successful in 5m53s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
2026-10-31 18:18:43 +11:00
sam 6031a7a14b ci(deploy): run the gate from the Taskfile, not an inlined copy (#1580)
deploy.yml inlined its own sequence, which drifted weaker than `task check`:
no db:check, news:check or ui:check, so a release could ship stale sqlc
output, a stale ui/dist, or release notes that disagree with CHANGELOG.md,
and the dashboard suite ran outside the gate without its type check.

The release now runs `task check TEST_FLAGS=-count=1`: same definition, the
full uncached suite including the Docker-backed tests -short skips. quality.yml
already invoked the Taskfile, so both pipelines now share one gate.
2026-10-31 00:37:26 +11:00
sam 3b6de96782 docs(deploy): name the registry each agent-image path publishes to
The pinning section said CI republished ghcr.io on every push to main. CI
publishes git.catlow.cloud, and only for a release tag; ghcr is where the
hand-run tools/publish.sh writes, which is the reference the default names.

A release zip pins a digest on a registry an anonymous pull cannot reach, and
[containers].registry_auth -- the setting that fixes it -- was documented
nowhere. Documented there, beside the pin.

Also corrected: every shipped profile does not pin the image, and the section
link omitted its number so it matched no heading.
2026-10-31 00:35:49 +11:00
sam cb29967e7b fix(releaseupdate): find releases in the public releases repository
The source repository is private, so the updater and install.sh got 404.
Releases are now published to samcharles93/archie-releases by
task release:publish.
2026-10-16 03:11:14 +11:00
sam cf34d03476 fix(release): push the release commit and its tag atomically 2026-10-06 00:50:12 +11:00
sam c486fe291c refactor(archieplaybooks): fold archie-playbooks into archied playbooks lint|serve 2026-10-04 01:20:33 +10:00
sam a8a118c1b8 chore: cut agent governance to a single constitution
Replace CLAUDE.md with a short decision-rule constitution; move PRDs,
architecture, development and design docs and repo skills out of the tree;
delete the docs tooling (docsgen, prdlint, docdrift, docsite, contractaudit,
reachaudit) and its gate steps; stop install.sh copying repo skills into
runtime skills.
2026-10-03 21:47:46 +10:00
sam 0d35e753b5 refactor: format markdown files using prettier, fix spelling concerns, reduce Taskfile bloat 2026-09-25 01:10:28 +10:00
sam 475dc7c097 docs(releasing): record that main and the branch diverge on every release
The release commit lands on main, because tools/release.sh refuses to run
anywhere else, while the working branch keeps advancing. So after every release
neither tip is an ancestor of the other and --ff-only fails in both directions
-- a refusal that reads as "the tree is not ready" when the tree is fine. It
cost confusion on both v1.38.0 and v1.40.0, and both times the correct answer
had to be re-derived from the commit graph.

Documents the order that keeps a conflict off main (merge main into the branch
first, then fast-forward), and the trap that catches people looking for main: a
detached worktree sitting at the same commit accepts --ff-only and moves
nothing, which looks like success.
2026-09-23 14:42:32 +10:00
sam 5d6fbd5c30 fix(release): CI owns the release stamp; :latest moves only from a release
Two beads, one root: four sites stamped a version and only two of them were CI.

`Taskfile.yml`'s build and `install.sh` derived GATEWAY_VERSION/RUNTIME_VERSION
from `git describe`, so a from-source build claimed a release it was not
running, and the stamp became a function of the commit graph -- the one input a
content-checksum build cache cannot see. An empty commit moved `git describe`
while `task build` reported "up to date" and shipped the previous stamp
(archie-core-pdq2). Both sites now stamp `dev`: a source build says so, and the
version a release carries is written into the artifact CI publishes. That
removes the non-file input rather than caching it, and traceability for a local
build is the checkout it came from.

`deploy.yml` published `:latest` from any push to main, so a release's own
stamping survived only until the next ordinary commit -- minutes, in an active
repo -- and a host deploying :latest reported dev, leaving the update path
unable to tell current from stale (archie-core-i5nb). `:latest` now moves only
from a commit that IS a release; every other build publishes `:edge` (mutable,
newest main) and `sha-<commit>` (immutable). A host that runs releases follows
`:latest`; a host that tracks main follows `:edge`, which RELEASING.md now says.

Verified: `task build` reports `archied dev`; the new workflow test fails
against the old workflow on all five guards and passes after; deploy.yml
parses; install.sh passes `bash -n`.

Gated with `task check` (exit 0) at 8faa0f6a -- the v1.39.0 base, CI-green --
with these five files applied. It is NOT gated at HEAD: HEAD carries an
unrelated red, `TestTaskProtoCarriesEveryDomainField`, because d6f61c2c added
ParkClass and RemediationRounds without the proto mapping. This change neither
causes nor fixes that.
2026-09-23 13:09:01 +10:00
sam eb45191c4b docs(release): record the one-stream process, and stop process scopes inflating versions
RELEASING.md still described two independently versioned components, GATEWAY
and RUNTIME release inputs, and a `task release:prepare` invocation that no
longer exists. It is the file someone reads to cut a release, so a stale one is
worse than none.

The PRD's version computation carried a real flaw: a commit whose scope is the
repository's own machinery could still bump the product's version, so the first
improvement anyone made to the release process would inflate it -- which is
exactly what `feat(release)` would have done to this cut. Non-product scopes
(`release`, `ci`, `docs`, `build`, `test`) now contribute no bump.
2026-09-22 21:43:10 +10:00
sam c530f2036e docs(releasing): the test is the reader, not whether a sentence is negative
The rule as first written said release notes state what a reader gets and that
withheld capabilities and failure modes belong in docs/architecture/. That is true
but blunt enough to invite the wrong edit: applied mechanically it deletes a caveat
a reader needs.

Three cases, distinguished by whose experience the sentence describes. A capability
that never existed leaves no expectation to correct, so a note about it reads as a
feature. The implementation's journey is not the reader's experience either. A
capability that shipped but is not yet wired is the reader's experience, and belongs
as a caveat paired with the behaviour that compensates for it -- the release note is
then the only place a reader learns they should not expect it to work yet.

The last line says so outright, because the failure mode of this rule is someone
applying it to a caveat.

The gate ran and passed in the same conditional chain as this commit.
2026-09-22 16:56:28 +10:00
sam 96314fb237 docs(news): state what a reader gets, and move the design where it is read
The v1.36.0 release note carried four things a reader cannot use. The dashboard's
seven in-browser tools and the installtype fix stay; the withheld judgement verbs,
the consequentialHint limitation and the two silent-failure notes are removed from
the release feed and moved to where an implementer looks.

  - The four verbs are withheld because an agent that can approve can approve its
    own work. That is settled design, so it now sits in docs/architecture/identity.md,
    beside the approval-path conflict it belongs with, stated as the constraint it is:
    attribution, not capability, is what releasing them depends on.
  - The browser-tool surface had no home in docs/architecture, so it has one now:
    docs/architecture/dashboard-agent-tools.md holds what a tool call can be
    attributed to, why confirmation is a signal rather than a control, and the two
    ways the surface fails silently.

Audited 1.35.0, 1.36.0 and 1.37.0 for the same class. 1.37.0 is clean. 1.35.0 carried
two build notes: a bullet recounting that a guard had never been written because it
failed, and a clause about a manager "finally" having a production writer. Both are
gone; the capabilities they were attached to remain.

RELEASING.md now carries the rule so the next release reads it: release notes state
what a reader gets, and design constraints, withheld capabilities and failure modes
belong in docs/architecture/, because a note about an absence reads as a feature to
someone who never had the thing.

docs/news/** is regenerated by task news, never hand-edited. task check passed before
this commit: the chain runs it, so a failing gate commits nothing.
2026-09-22 16:53:27 +10:00
sam d8d7662c13 fix(release): package and update archie-messaging on a host install
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]".
2026-09-22 05:42:17 +10:00
sam 923569674b docs(release): document what a release publishes
The zip and its Release were undocumented: RELEASING.md described the
images and the gate, and nothing about dist-zip, the Release asset, or
that a gateway-only release does not rebuild the agent image. Adds that,
plus the consequence that bit this release -- Actions runs the workflow
from the tagged commit, so a deploy.yml fix must be an ancestor of the
tag rather than a commit on top of it.
2026-09-17 07:20:33 +00:00
sam 851c46d8ed docs(deploy): UI Service deployment, auth, and operations profiles
Bead archie-core-8cda.5.5:

- task dev now runs archie-ui (dev:dashboard) on :8484 -- after the
  cutover archied binds no dashboard listener, and Vite's /api,/events
  proxy needs a live receiver there. dev:mobile starts archie-ui with a
  LAN bind and -token-file (reusing the pre-cutover token path) instead
  of a mobile archied overlay; dev:ui's summary points at archie-ui.
- deployments/dev.toml documents itself as the archie-ui overlay and
  states the [services.gateway] target explicitly.
- systemd-user-service.md: the auth gap is now the documented posture --
  archie-ui has no secret registry, resolves GATEWAY_TOKEN/
  STATE_STORE_TOKEN from its process environment only, so the starter
  (EnvironmentFile) exports them; worked env-file example added, plus
  /healthz as the token-free liveness probe.
- INSTRUCTIONS.md ships five binaries with archie-ui in the quickstart
  and the token story; README.md carries the auth note; the
  docker-nats-stack profile notes archie-ui binds [web] and dials the
  same [services.*] targets.
- release tooling: archied's component closure extends with
  cmd/archie-ui and internal/app/archieui, so a UI-process-only commit
  can no longer fall between the two changelogs; RELEASING.md documents
  that the UI Service ships inside the archied release.
2026-09-10 01:14:14 +10:00
sam e736910ab3 docs: add RELEASING.md, stop asking whether to skip an untouched component
Every release session asked the same question and got the same
answer: archie-agent has no unreleased changes touching its own
package closure, so skip it. Codify the rule instead of asking each
time -- only version a component with actual unreleased commits in
its closure, don't bundle an unrelated backlog into an unrelated
release just because it's "due", and don't ask when the answer is
mechanically decided by tools/release.sh's own dependency check.

CLAUDE.md's Release process section pointed to duplicated instructions;
replaced with a pointer to RELEASING.md so there's one source of truth.
2026-08-23 23:40:45 +10:00