Commit Graph
524 Commits
Author SHA1 Message Date
sam 05944b6fd3 fix(worktree): force checkout so retry recovers from a dirty worktree
refresh checked out the task branch without Force before hard-resetting
to base. A prior attempt's leftover uncommitted changes -- a killed
container, or a stage that edits files before ever reaching a commit --
made go-git's default MergeReset checkout refuse to reconcile them, even
with HEAD already on the correct branch and the target commit unmoved.
The fallback then made it worse: any checkout failure was assumed to
mean the branch didn't exist yet, so it retried with Create: true, which
failed with a much more confusing error since the branch did exist --
"a branch named ... already exists" -- masking the real cause and
parking the retry with the same unhelpful message every time.

Reproduced directly against a live deployment's actual broken worktree
(modified tracked file, untracked file, branch already checked out) and
confirmed retry then succeeds and correctly restores to base.

Force is safe unconditionally here: refresh hard-resets to base a few
lines later regardless of what checkout leaves behind.

Closes #523
2026-08-15 11:22:22 +10:00
sam d83f5a9be3 chore(release): archied v1.9.1 archie v1.9.1
deploy / gate (push) Failing after 3m30s
deploy / build-and-push (push) Skipped
2026-08-15 10:35:18 +10:00
sam 369b13b688 feat(releaseupdate): stamp install type at build time, fail closed on unknown
/update could report success at the correct target version while the
archie-agent container running it never actually changed: the update
mechanism trusted the configured installer's exit code and reported
whatever version number the release claimed, with nothing verifying
the two agreed.

The first piece of the fix: a new internal/installtype package
reports how a binary was built for distribution (Type(), defaulting
to "unknown"), stamped once per release artifact via
"-ldflags -X .../installtype.buildType=<value>" rather than guessed
at runtime by probing the environment -- restic and Tailscale both
treat "which install shape is this" as a build-time decision for the
same reason: a probed signal is guessable, a compiled-in one is not.

releaseupdate.Service.Install now refuses to run the configured
Installer at all when InstallType is unset or installtype.Unknown, so
an unstamped or misconfigured build can no longer silently attempt an
update it has no way to know is even the right kind for how this
instance was deployed. Wired through every real archied build path so
the gate doesn't just exist in principle: Taskfile.yml's build task
(binary), Dockerfile.archied (container), and install.sh (binary) all
now stamp it; cmd/archied/telegram_setup.go wires
Service.InstallType from installtype.Type().

Configuration-page display of install type/version and post-update
verification against the actually-running reference (not just the
installer's reported version) remain open -- this lands the
correctness gate, not the full observability surface.

Refs #522
2026-08-15 10:34:46 +10:00
sam d958923033 fix(webui): filter turn_completed noise from the Live Activity SSE feed
turn_completed fires on every chat turn so input-driven curators can
wake on it, but it carries no task correlation (TaskID always 0,
Detail a raw session ID) -- on the dashboard's "Live activity" panel
this drowned real task-lifecycle events: 27 of the last 30 rows in a
live sample were content-free turn_completed noise.

Excluded at the SSE boundary (sseVisible), not at publish, so
curators reading the Bus directly are unaffected. since still
advances past a filtered event exactly as it would for a sent one --
EventsSince only ever returns events with id > since, so leaving
since behind a filtered event would make the next catchUp refetch it
forever.

Closes #521
2026-08-15 10:34:33 +10:00
sam d9a9b17153 fix(agentworker): forward workflow events across the NATS worker boundary
A workflow run through the container/NATS path never wired
workflow.TaskContext.Bus, so every tc.Emit call (stage_start,
stage_finish, outcome, parked) was a silent no-op. archied's own
in-process path sets Bus and always worked; anything dispatched to an
archie-agent worker did not, which meant the dashboard's per-task
timeline showed "No events yet" for every task regardless of status
or stage -- confirmed live across a Working task and two differently
parked tasks.

Bridges the gap the same way system logs already cross this boundary:
ForwardTaskEvents relays a per-task in-process *events.Bus to a new
NATS subject (SubjectForEvents), and a new daemon-side subscriber
(subscribeAgentEvents) republishes decoded events on the daemon's own
Bus, landing them in the same persist-and-broadcast pipeline an
in-process workflow already used.

Closes #518
2026-08-15 10:34:25 +10:00
sam 0d1d418f60 chore(release): archied v1.9.0 archie v1.9.0
deploy / gate (push) Failing after 2m30s
deploy / build-and-push (push) Skipped
2026-08-15 02:25:10 +10:00
sam 8c7052b20b refactor(webui): decompose handleSSE to cut cognitive complexity
handleSSE mixed connection registration, backlog catch-up, and live
broadcast relay into one function with three nested closures --
gocognit flagged it at 52 against a limit of 30. Extracted each
concern into its own top-level piece: sseSince (resume-point
resolution), registerSSEConn (subscribe/unsubscribe), and a new
sseStream type carrying the per-connection state (send, catchUp,
sendPage, drain) that the closures used to capture implicitly.

Behavior is unchanged -- catchUp/sendPage's page-boundary and
target-reached logic is the same control flow the original closure
had, just named and independently testable. handleSSE itself is now
a straight-line sequence of calls.

Added direct unit tests against sendPage/catchUp for the boundary
cases a full HTTP round-trip test doesn't exercise: a target reached
mid-page vs. at a page boundary, a target of zero (drain everything),
a write failure stopping the page immediately, and backlog spanning
more than one EventsSince fetch.
2026-08-15 02:24:43 +10:00
sam 9a01af3811 fix(telegram): use NewRequestWithContext to satisfy noctx
Pre-existing lint finding, unrelated to any behavior change.
2026-08-15 02:19:57 +10:00
sam afd00be00e fix(telegram): guarantee no message is stranded on gateway stop/restart
A daemon shutdown or /restart cancels turnCtx without any guarantee
that the goroutine owning a liveReply ever runs again to notice and
clean up after itself -- a full process exit gives it no chance at
all. Gateway now tracks every liveReply mid-turn in a registry and
Stop drains it, marking each as interrupted so nothing is left ending
in the "typing" cursor forever.

finalize and abandon now run their bodies inside a per-reply
sync.Once (the terminal field): a turn finishing naturally and a
concurrent Stop draining the same reply were reaching it from two
goroutines at once, both sending their own edit for the same message
with the outcome decided nondeterministically by which HTTP response
Telegram processed last -- including a complete real answer getting
silently overwritten by the restart marker. Only one side's body now
ever runs; the other blocks on the winner and then does nothing.

The drain itself is bounded (liveDrainTimeout, default 5s): a single
stalled Telegram API call must not hang gateway, and therefore
daemon, shutdown indefinitely. Entries still in flight past the
deadline keep running in the background rather than blocking Stop.

A liveReply created in the narrow window between Stop claiming the
registry and its own registration call is abandoned immediately
instead of being registered into (and lost from) a registry nothing
will drain again.

Regression tests cover the mutual-exclusion race directly (20
iterations of finalize and abandonRestarted racing on the same
reply, asserting exactly one outcome ever wins), the bounded drain
against a deliberately hung API call, and the post-stop registration
gap.
2026-08-15 02:19:53 +10:00
sam a60dea926f fix(config,webui): make show_tool_calls one cross-channel setting
show_tool_calls gated Telegram's tool-activity narration only; the
web dashboard's SSE chat stream narrated every completed tool call
unconditionally with no way to turn it off, leaking tool names and
parameter shapes to anyone with dashboard access even when an
operator had already opted out for Telegram.

Moved ShowToolCalls from TelegramConfig to ChatConfig so it is one
setting for every channel, and wired the webui stream to it:
chatStreamSink now carries a showToolCalls flag (snapshotted once per
turn, mirroring how Telegram's liveReply snapshots it) and ToolCall
no-ops when it's off.

BREAKING: an existing [chat.telegram] show_tool_calls = true in
config.toml now parses as an unrecognized key under [chat.telegram]
and is silently ignored (TOML decoding is non-strict) rather than
erroring -- move it to the top-level [chat] table.
2026-08-15 01:57:06 +10:00
sam 15556a8a1c docs(agent): correct markSafe's doc comment to its actual existence check
The comment claimed a mount was checked before touching the
operator's global gitconfig; the code only ever checked os.Stat
(existence + directory-ness). A directory that merely exists at the
mount path -- a stale leftover, never actually bind-mounted this run
-- already satisfied the guard and got added to safe.directory,
exactly what the comment said it prevented. A real mount check would
need platform-specific mountinfo parsing for an inert failure mode
(the entry does nothing unless a git repo later exists at that exact
path), so this corrects the contract to match the code and pins it
with a test instead of changing behavior.
2026-08-15 01:48:39 +10:00
sam 023d0a0165 docs(telegram): note the live-edit timestamp trade-off on liveReply
The finished reply is delivered by editing the message created at the
first streamed frame, and editMessageText does not change a
message's date, so a long tool-using turn's answer keeps its
turn-start timestamp and can sort before conversation that produced
it. Delete-and-resend would fix the ordering but reintroduce the
flicker/reorder streaming exists to avoid, so this documents the
accepted trade-off rather than changing behavior.
2026-08-15 01:48:33 +10:00
sam c2e8638d24 fix(webui): style tool-call failure from a structured field, not a string prefix
chatStreamEvent gained a Failed bool, set from ToolCallEvent.Err !=
"" -- the field the rest of the codebase already treats as
authoritative -- rather than the browser sniffing summary.startsWith
"failed:" on rendered text. A successful tool whose own output starts
with that literal string (a grep hit, a log line read back) was being
styled as a failed step.
2026-08-15 01:48:29 +10:00
sam 707af1dde5 chore(release): archied v1.8.0
deploy / gate (push) Failing after 3m34s
deploy / build-and-push (push) Skipped
2026-08-15 01:44:00 +10:00
sam 1915ef8ab4 fix(config): de-duplicate disabled-forge predicate, export ForgeDisabled
cmd/archied carried a copy of the none/off/disabled predicate because the
configuration package's version was unexported. Two copies of a validation
predicate drift: a fourth disabled alias added in one place would silently
leave the other accepting it.

Export ForgeDisabled in internal/infrastructure/configuration as the single
definition, referenced by both validateIdentities and resolveForge, and
delete the duplicated copy. TestForgeDisabled pins the exact alias set
(including case-variant and empty-string guards); the resolveForge
degradation test now asserts on the warn log so the silent disabled path is
distinguishable from the token-unavailable fallback (verified to fail under
a re-inlined 'none'-only copy).
2026-08-15 01:43:31 +10:00
sam 968872e55a fix(telegram): keep tool activity visible and mark failed/empty turns
Three more P2s from the same code-review pass: the live frame's
single clamped buffer mixed tool lines and answer text chronologically,
so early tool lines silently scrolled out of the frame once the answer
grew past liveBodyMaxRunes and only reappeared at finalize (which
already led with tools separately). Tool lines are now tracked
exclusively in toolLines; a new framedText helper keeps the tool block
whole and clamps only the answer tail, used consistently by the live
frame, an abandoned frame, and the finished message.

A tool-only turn with no reply text used to finalize as a bare,
immutable tool line indistinguishable from a real (if terse) answer;
finalText now appends an explicit "(no response)" marker in that case.

A provider error used to funnel into the same clean-partial path as a
deliberate /stop, so a failed turn was indistinguishable from a
successful short one. abandonFailed appends a "turn failed" marker
before dropping the cursor; /stop still goes through the unmarked
abandon path.

Regression tests cover all three paths plus the degenerate case where
a tool block alone exceeds the frame budget, verified red-then-green
against the pre-fix code.
2026-08-15 01:25:20 +10:00
sam c3d6a384a6 fix(telegram): harden live-reply delivery against /stop and multi-byte content
Three P1s from code review of PR #476: finalize sent the authoritative
reply through the same cancellable turnCtx a /stop kills, so a stop
landing mid-finalize stranded the live message with its cursor
forever; abandon had the identical hazard, saved only by its one
caller wrapping the context correctly. Both now strip cancellation
internally (context.WithoutCancel) rather than trusting callers to
remember.

Tool activity lines were composed unescaped into the same Markdown
body as the model's own reply, so a stray '*', '_', or backtick in
tool output/parameters could unbalance the whole message and take the
reply's formatting down with it. ToolCall now runs name, parameters,
and summary through bot.EscapeMarkdown before joining the line.

splitLongMessage sliced oversized lines on byte offsets, cutting
mid-rune for any multi-byte UTF-8 line crossing the 4000-byte bound
(CJK, emoji) and producing invalid UTF-8 parts. It now counts and
slices on runes throughout.

Regression tests cover all four paths, verified red-then-green
against the pre-fix code.
2026-08-15 01:06:27 +10:00
sam 2ac54dfb25 Merge pull request #481 from samcharles93/chore/stop-tracking-beads-jsonl
chore: cleanup of noisey beads files
2026-08-15 01:03:33 +10:00
sam d06e3ea73d chore: cleanup of noisey beads files 2026-08-15 01:02:13 +10:00
sam fa0973dbd5 Merge pull request #480 from samcharles93/refactor/archie-agent-main-cleanup
refactor(agent): move worker runtime into application layer
2026-08-15 00:51:03 +10:00
sam 45345cdfb6 refactor(agent): move worker runtime into application layer
cmd/archie-agent used to own worker construction, NATS lifecycle, task execution, MCP setup, and workflow wiring. It now owns process input only and invokes internal/app/agentworker, while transport-specific NATS, boot-brief, and git-safety mechanics live under infrastructure.
2026-08-15 00:43:12 +10:00
sam 0243c13d37 Merge pull request #478 from samcharles93/chore/bump-ai-sdk-v0.1.21
chore(deps): bump ai-sdk to v0.1.21
2026-08-15 00:29:27 +10:00
sam 1e5e1fbcc8 Merge pull request #477 from samcharles93/fix/archie-core-tb3a
fix(chat): harden inline tool call streaming
2026-08-15 00:25:23 +10:00
sam e93ddf3128 chore(deps): bump ai-sdk to v0.1.21
ai-sdk v0.1.21 wraps the cancellation cause in aborted-stream errors
("%w: %w") instead of formatting it, so errors.Is(err, context.Canceled)
is reliable again. The Telegram channel was compensating with a comment
explaining why errors.Is could not be trusted.

The code was already correct; only the comment was obsolete. It now
states the real reason for context.WithoutCancel(turnCtx): turnCtx is
dead on both stop and fault paths, so the cursor-drop edit needs a live
context. The runtime effect of the bump is that a /stop landing inside
the step loop is now logged as "chat turn stopped" rather than
"route failed".

Refs ai-sdk-0pn
2026-08-15 00:24:33 +10:00
sam e9bc36e33d fix(chat): harden inline tool call streaming
Telegram streaming callbacks now enqueue cancellable rendering rather than performing network I/O while draining the authoritative model stream. Final edit failures fall back to normal split delivery.

Completed tool events now correlate inputs by call ID and expose only bounded, conservative parameter shapes. Tool-call visibility is snapshotted per reply so reloads cannot change an in-flight turn.
2026-08-14 04:52:48 +10:00
sam d8a9f60ba8 Merge pull request #476 from samcharles93/feat/467-inline-tool-calls
Feat/467 inline tool calls
2026-08-14 02:50:14 +10:00
sam 74d787c5a7 chore(beads): export issue state 2026-08-14 02:41:46 +10:00
sam 06dc034a72 feat(chat): show tool calls inline and stream replies into one message
Chat returned only the final answer, so a wrong tool choice, a
hallucinated action, or a footgun like `systemctl stop` against
`restart` was invisible from the conversation. Only text deltas were
threaded through the turn, and tool calls executed inside Generate with
nowhere to report.

Replace the delta callback with gateway.TurnStream, which carries text
fragments and completed tool calls on one ordered path from the model
loop to the channel. The sequence is the point: a tool line that
overtakes the sentence it interrupted describes a turn that never
happened. Text-only callers use gateway.DeltaFunc and are unaffected.

A tool is reported on its result, never on its call  --  the call part
carries no outcome yet, so reporting both would list every tool twice,
once with nothing to say.

Telegram renders it behind [chat.telegram] show_tool_calls, off by
default: this is debugging visibility, and it narrates every internal
step to provide it. The dashboard always shows it, being the operator's
own observability surface; its tool lines are live-only and are not
persisted with the conversation.

The Telegram live reply changes mechanism, and with it what a frame
MEANS. It used to stream through sendMessageDraft: drafts are ephemeral
30-second previews, so a tool call longer than that outlived the
preview, and successive frames were observed concatenated with their
cursors intact. It now sends one real message and edits it. An update
used to be "the next preview of the answer"; it is now "the whole
answer as it currently stands, replacing what is there". The cursor is
appended at render time and never stored, so exactly one exists and
always at the end, and a frame too long for one message is cut to its
tail rather than rejected outright.

A stopped or failed turn now edits the cursor away instead of leaving
it blinking on a message nothing will finish. That cleanup runs on a
live context because turnCtx is already dead, and it runs on both
failure branches: ai-sdk raises an aborted stream as ErrAborted with
ctx.Err() formatted in rather than wrapped, so errors.Is cannot be
trusted to tell a /stop from a fault.

Closes #467
2026-08-14 02:36:12 +10:00
sam fd8f9f925f fix(agent): route git safe.directory setup through markWorktreeSafe
The dubious-ownership fix landed twice: markWorktreeSafe in gitsafe.go
and an inline exec.Command block in main.go, both configuring the same
safe.directory on every start. Two setup paths for one invariant means a
later change to either one silently disagrees with the other.

Keep the tested helper and drop the inline block. markWorktreeSafe also
skips the call when /data/worktree is not a mounted directory, so
running archie-agent directly on a host no longer writes to the
operator's own ~/.gitconfig for a path that was never mounted.

The new test parses main.go and fails on more than one setup path, so a
future re-addition of an inline block is caught rather than merged.

Refs #468
2026-08-14 02:35:49 +10:00
sam a1a2a943e1 feat(agent): mark the mounted worktree as a git safe directory 2026-08-14 01:59:56 +10:00
sam 325a4afb1e chore: remove beads config file 2026-08-14 01:59:56 +10:00
sam cb4434c5ef bd init: initialize beads issue tracking 2026-08-14 01:59:56 +10:00
sam 865905a95a Merge pull request #465 from samcharles93/alert-autofix-5
Potential fix for code scanning alert no. 5: Open URL redirect
2026-08-12 19:22:11 +10:00
sam afb8c3a064 fix(webui): preserve encoded redirect path characters 2026-08-12 19:19:48 +10:00
sam 2ed4e14127 Merge pull request #469 from samcharles93/fix/dubious-ownership-agent-container
fix(agent): resolve git dubious-ownership in sandbox containers
2026-08-12 16:13:05 +10:00
sam 4f4e151ff8 fix(agent): resolve git dubious-ownership in sandbox containers
Agent containers bind-mount the worktree from the host at
/data/worktree, where the owning UID differs from the container
user's UID. Git refuses to operate in such directories, so every
gate command that calls the Go toolchain (go build/test/vet) fails
with 'fatal: detected dubious ownership in repository' before any
real work begins.

Add 'git config --global --add safe.directory /data/worktree' at
archie-agent startup so all subsequent git-spawned operations
(baseline gate, build gate, agent shell tool invocations) work
correctly. Logs a warning if git is unavailable rather than
failing — the agent remains usable for repos with no gate config.
2026-08-12 14:37:37 +10:00
sam 4e0eade43f Merge pull request #466 from samcharles93/fix/github-create-issue
forge/github: implement CreateIssue to un-stub the method
2026-08-12 13:50:20 +10:00
sam a56f95d967 forge/github: implement CreateIssue to un-stub the method
Replaces the 'not yet implemented' stub with a real call to
go-github's Issues.Create, mapping title, body, and labels.
2026-08-12 13:49:20 +10:00
sam fdfe054f74 Potential fix for code scanning alert no. 5: Open URL redirect 2026-08-12 11:40:21 +10:00
sam 367637d174 fix(webui): cap and centre the Configuration page instead of its lists
The page ran the full width of the shell, so a card was roughly 1300px
of which the content used the left third. Every previous attempt fought
that inside the card by capping or shrinking .kv-list, which only moved
the imbalance around: the lists changed width but the Repositories and
Providers tables stayed stretched just as far, and shrinking the lists
broke the row separators and the alignment of the Edit column.

Constrain the page container instead. One max-width and auto margins on
the view fixes every child at once, so cards, key/value lists and tables
all sit on the same readable measure and the leftover space falls
outside the cards where it reads as margin rather than as a hole.

Scoped to this page as .cfg-page rather than added to .page-head, which
every other view shares; widening that is a separate decision.

This is what `margin: 0 auto` was for. Applying it to .kv-list, which is
what I tried first, really would have misaligned each list against its
own card heading and against the table beneath it, and I used that to
rule the approach out rather than to move it up a level.
2026-08-10 03:18:17 +10:00
sam f2eaba2fe1 fix(webui): keep Configuration rows full width, hug only the label column
Sizing the whole list with width: fit-content fixed the label-to-value
distance by breaking the row: every list ended at a different width, the
separators stopped part-way across the card, and no two Edit buttons
shared a column.

Those are two different knobs and only one of them was ever the bug.
How far the value sits from its label is set by the label track; how
wide the row is is set by the container. Hug the first, leave the second
alone: the label column is max-content so the value starts immediately
after the longest label, the value column takes the slack, and the
actions column is pinned right. The row spans the card again, so the
separators run full width and every Edit lands in one column, while the
label-to-value distance stays as short as it was.

Verified against the built stylesheet in the dark theme at 1440px:
label and value adjacent, locked reasons on their own line, actions
aligned across sibling lists.
2026-08-10 03:11:58 +10:00
sam 7b07033d7c fix(webui): size Configuration key/value lists to their own content
The rewrite capped .kv-list at 72rem and left it anchored to the card's
left edge, so on a wide screen the rows stopped well short of the card
and the action column floated in the middle of the dead space rather
than sitting near the value it belongs to.

Any fixed cap is a guess that is wrong at some viewport: too wide and
the actions drift away from the value, too narrow and paths truncate
for no reason. Size the list to its children instead --
width: fit-content, bounded by max-width: 100% so a pathological value
clamps and lets the ellipsis take over.

Not centred with margin: 0 auto. These lists share cards with
full-width tables (Models & providers has both), so centring would
misalign every list against its own card heading and against the table
directly beneath it.

Sizing to content required moving the columns off the row and onto the
list. Each .kv was previously its own grid, so no row could size a
column against any other row, and a max-content label track would have
ended at a different x on every line. The list now declares the tracks
and each row adopts them with grid-template-columns: subgrid, giving
one shared label column sized to the longest label and no wider. A
@supports fallback keeps the previous bounded-column behaviour where
subgrid is unavailable, and the narrow-viewport rules drop out of
subgrid because a shared label column is the wrong shape once the row
stacks.

Verified by rendering the built stylesheet against representative
markup rather than by inspection: label and value adjacent, notes on
their own line, actions in a reserved column, no dead space.
2026-08-10 03:07:47 +10:00
sam fb7fba4232 fix(webui): rebuild the Configuration page layout so values stop colliding
The page had three compounding layout faults, all visible on a wide
screen and all still present after the earlier spacing pass:

  1. .cfg-row used justify-content: space-between on a full-width card,
     so the label sat at the far left and its value at the far right with
     roughly a thousand pixels between them. Reading one pair meant
     tracking across the viewport. The earlier "tighten KV row spacing"
     change reduced vertical padding only, which is why the complaint it
     was meant to answer survived it.
  2. .cfg-value had no min-width: 0, so a long value could not shrink
     inside its flex parent. It overflowed into the Edit button, which is
     why 400 rendered as "40" and 100000000 was clipped mid-number.
  3. The locked-row reason was a flex sibling of that overflowing value,
     so it ran onto the end of the path with no separation, rendering
     ".../archie/work" and "pins the daemon's working layout" as one
     unbroken string.

Replace the flex row with a three-column grid: label, value, actions.
Label and value are adjacent and left-aligned so the eye travels a fixed
short distance at any viewport width; the value column is minmax(0, 1fr)
so it can actually shrink, truncating with an ellipsis and keeping the
full text in a title attribute; actions occupy a reserved column that
nothing can overlap. Secondary text (locked reason, override marker,
validation error) gets its own grid row instead of sharing the value
line. Narrow viewports stack label over value rather than truncating
both to a few characters.

Extract the row renderer into settings/config-row.js. settings.js
imports its own stylesheet, which the node test shim cannot parse, so
the rendering logic was untestable where it sat; this mirrors
tasks/task-row.js. Seven tests now cover the two collision bugs
structurally, asserting on per-child text rather than the row's
flattened string so a future layout change cannot pass by merging the
fields back into one node.

Also stop sharing .cfg-rows with the Workflows "Start work" form. A
class owned by the Configuration page meant restyling Configuration
could silently restyle that form; it is now .wf-form, owned by the
feature that uses it.
2026-08-10 03:00:56 +10:00
sam 7ee68d080a feat(archied): add -version so the installed build can be read from a shell
gatewayVersion and runtimeVersion were reachable only through the chat
/version command, which needs a running daemon and a configured channel.
An update-check adapter has to answer "what is installed?" before it can
compare against what is available, and had no way to ask.

Prints one "name version" pair per line so a shell adapter can parse it
without a JSON dependency.
2026-08-10 02:48:59 +10:00
sam 94adedc2d7 fix(build): stamp versions in task build, not only in the Docker image
Version stamping lived solely in Dockerfile.archied's -ldflags, so any
build from source reported gatewayVersion/runtimeVersion as "dev". That
covers every host deployment: carina builds the binaries with go build
and runs them under systemd, never touching the image, so /version there
answered "Archie Gateway: dev Runtime: dev" for a tagged release.

Derive the same -X values from the release tags. git describe without
--abbrev=0 gives 1.7.0-2-gbb54786 when HEAD has moved past the tag,
which is the honest answer for a mid-cycle build rather than claiming
the release itself.

archie-agent has no version variable, so only archied is stamped.
2026-08-10 02:42:24 +10:00
sam fcfe5cf264 fix(deploy): wire ExecReload so SIGHUP config reload works under systemd
archied v1.7.0 reloads its configuration on SIGHUP, but neither the unit
written by install.sh nor the one in the systemd runbook declared
ExecReload. 'systemctl --user reload archied' therefore failed, and the
only way to reach the new reload path was to know about
'systemctl --user kill -s HUP'.

The feature shipped with no supported trigger in the documented
deployment shape. Existing installs need the same line added, either by
re-running install.sh or via a drop-in.
2026-08-10 02:31:59 +10:00
sam 8e8c22be61 fix: docker-compose corrected image path 2026-08-10 02:28:48 +10:00
sam f03e927fe4 ci: strip the v prefix when matching release tags to changelog sections
deploy / gate (push) Failing after 2m15s
deploy / build-and-push (push) Skipped
The gate derived the version with ${tag#archied/}, which leaves "v1.7.0",
then looked for a "## [v1.7.0]" heading. Changelog sections carry no v --
tools/release.sh writes and validates "## [1.7.0]" -- so the gate could
never match and every tagged release failed before the images were built.

This is the gate's first tagged run: it landed in dd9bddc, after the
archied/v1.6.0 tag, so nothing had exercised this branch until v1.7.0.
2026-08-10 02:22:50 +10:00
sam 6d5fdd72a3 chore(release): archied v1.7.0 archie v1.4.0 2026-08-10 02:13:39 +10:00
sam 5104c50953 Merge pull request #464 from samcharles93/feat/348-config-editing
Feat/348 config editing
2026-08-10 02:04:55 +10:00