Nothing told the operator that a run was waiting for a person or had failed; they
found out by going looking. A run that needs attention now reaches the ntfy they
already run, and the app answers "what needs me now" in one live, ordered surface.
Server (smallest change, reusing the existing publisher):
- internal/server/notify.go adds notifyRun, called from finishRunState (failed)
and when a run parks on a human (runner.go runLoop). It publishes to the same
already-configured `system` destination through the unchanged stage.PublishNtfy,
so there is no second publisher, topic or service and the token handling is the
stage's own. runAttentionEvent maps only waiting and failed; queued, running,
succeeded, canceled and interrupted publish nothing.
- No storms: runner.attentionSent records sequence:event per run before publishing,
so a run that stays waiting is never republished on a re-request or restart, and
a stage notify policy that already covers the same event marks it first so the
run-level default is suppressed. The set is dropped when the run is terminal. A
delivery failure is logged, never fails the run, and is not retried.
- The payload names the run and pipeline and carries a click action
pipelines://run/<id> (validated: absolute URL, no userinfo, no fragment, no
credentials). PublishNtfy gained the optional click parameter; existing callers
pass "".
App:
- AndroidManifest/MainActivity declare the pipelines://run/<id> deep link
(singleTop); runIdFromDeepLink parses it and PipelinesApp opens that run once,
clearing the link. It opens a run; it starts nothing.
- ui/Attention.kt is the pure model (status -> Decision/Failed/Finished or
nothing, ordered by kind then newest-first) and ui/components/AttentionSurface.kt
is the floating indicator plus bottom sheet. It is derived from the same run
events the server already pushes, so an entry appears with no refresh and clears
when resolved; a finished run clears once looked at, and any entry can be
dismissed, persisted in SettingsRepository. The existing destinations, pill and
bottom strip are untouched and no competing navigation surface is added.
Checked before committing:
- Packaged authoring skill references: internal/author/skill/references/
notifications.md documents the automatic run-attention notifications and the
app surface. The only packaged "template" carrying notify is that reference; no
pipeline definition template exists to update and install.go's managed file list
is unchanged (notifications.md already existed).
- Repository guidelines: docs/ntfy.md gains an "Automatic run-attention
notifications" section and no longer claims "No block means no notifications";
the top-level README phone-notifications note now says a waiting/failed run
notifies automatically; android/README.md gains the dated feature section and
supersedes the previous section's note that the attention surface was absent.
- docker.md, install docs and the CLI/TUI docs describe mechanisms this change
does not alter; left as they are.
Tests: go test ./internal/server/... ./internal/stage/... ./internal/author/...
all ok; notify_test.go covers the event mapping and the real HTTP delivery
(destination, topic, click, no duplicate). Android :app:testDebugUnitTest ->
BUILD SUCCESSFUL, 58 suites / 531 tests / 0 failures (new AttentionTest, 13 cases,
covering ordering, appearing from a push, clearing on resolution, dismissal, the
empty case, persistence and the deep link). Device screenshots and the phone's own
notification are visual review's per the brief's device policy.
Scope: android/ plus the smallest server change; no new dependency, no run started
from the app, no installer or Docker change.
Treat a failure to reach the harness before any prompt or tool call is
admitted (connecting or creating the session) as a distinct retryable
reach failure, so a transport blip at the first stage no longer ends a
mutating run; keep post-admission readback/poll/agent failures retried
only on an explicit read-only stage and never replay admitted tool work.
Preserve the true cause when the context is already done (join ctx.Err
with the typed transport error) and report a sanitized unknown provider
error name/status instead of a blanket summary.
Make the isolated format-repair deadline proportional to the stage
timeout (floored, capped and clamped to remaining minus a margin) so a
slow-but-repairable result is recovered without ever extending the stage
deadline; the bounded ladder, value guard, deny-all formatter session,
cumulative usage accounting and no-tool-replay rule are unchanged.
Update docs/model-results.md, docs/pipeline-performance-review.md and the
packaged skill references; add stage, opencode and server fixtures.
Replace the Android app's one-second run poll with the server's
workspace-scoped run_event pushes. The runs list, each pipeline row's
last-run line, the run header and the run detail (status, timeline,
stages, artifacts) now advance from the socket instead of polling or a
manual refresh.
- Wire: Message.kt mirrors internal/protocol/runevents.go (subscribe,
unsubscribe, run_event; RunEventFrame/RunStepDelta). The frames are
unsolicited and already arrive on the client's events stream;
PipelinesRepository.subscribeRuns/unsubscribeRuns add the typed
command, sent via a new PipelinesClient.sendOnly that does not hold the
send lock waiting for the running server's unreliable subscribe ack.
- One pure fold: ui/RunEvents.kt folds a frame into the list (in place,
order preserved) and the open detail with one shared status ladder and
one shared run-field merge. It is monotonic (a stale or duplicate
delta is dropped whole), reports needsResync for a run the list does
not hold instead of inventing a row, and only requests a full get_run
for a settled step or terminal run.
- Wiring: AppViewModel subscribes once per (re)connect and workspace;
every (re)subscribe re-reads the list and open detail once, because the
deployed server's subscribe snapshot is partial, then folds the pushes
on top. Re-reads are push-driven, coalesced and keyed so no push is
dropped and no timer remains. LiveBadge (RunStream.kt RunStreamState)
shows honestly live/reconnecting/not live, confirmed by the ack, a
push or a successful read and dropped when a read fails.
- ui/RunEventsTest.kt pins the delta sequence as pure cases: created run
not in the list, step started, step finished, run finished, unknown
run, duplicate/out-of-order deltas, and a reconnect resync.
- android/README.md records the change, the wire mapping and the
observed limitation of the running server (partial snapshot, no ack
within 30s), which the client tolerates without inventing a stream.
Checked where the change belongs: android/README.md gained this entry;
docs/cli.md described the Android app as still polling, which this makes
stale, so that sentence now says the app consumes the pushes while the
TUI still polls. The packaged TUI pipeline templates (internal/tui) do
not touch run-state refresh and need no change, and the packaged
authoring skill references (internal/author/skill/references) document
the authoring workflow, not the Android client's run updates, so none of
them needs updating.
Reviewed and approved by the run's review stage (build, unit tests,
Kotlin compile and lint in android/README.md); no merge/rebase/cherry-pick
was in progress and no conflict was present.
chat_sessions used to list exactly the OpenCode sessions the pipelines own,
filtered through pipeline.SessionOwner (run_steps/run_session_owners), so an
operator-created chat was an accident of the run-ownership table and the
operator's working sessions were mixed with the internals of running pipelines.
Add a first-class operator session:
- internal/pipeline/operator_sessions.go: a dedicated operator_sessions table
(session_id PK, directory, title, tag, created_at, last_used_at) with
RecordOperatorSession (upsert preserving created_at), a one-statement
TouchOperatorSession (no-op for a non-operator id), OperatorSessions bounded to
128 rows most-recently-used first, and OperatorDirectories (bounded MRU,
deduped). run_steps/run_session_owners and SessionOwner/OwnedSessions are
untouched.
- internal/server/chat.go: chat_sessions returns operator sessions only - it
reads the registry once, intersects it with one broker session-list call, fills
directory/tag/created/updated from the registry, sets busy for a session held
by another connection, keeps MRU order, and stays fail-closed (empty list, never
the endpoint's whole list). A pipeline stage session and an untagged row can
never be listed. chat_create resolves the directory (empty/'~'/'~/...' ->
operator home; relative or missing rejected before any OpenCode call), calls
broker.Create(title, resolved) and records the row with the operator tag.
chat_directories returns home first then bounded (8) deduped recents. A
successful prompt touches the operator session without affecting pipeline
prompts.
- internal/opencode, internal/protocol, internal/server/websocket.go and
message.go: unscoped session list, Create posts {"title":...,
"location":{"directory":...}} to POST /api/session, additive protocol fields
(omitempty) and the ChatDirectories request/response, plus the OperatorRegistry
option defaulting to the first store. One OpenCode transport per server is
unchanged.
Docs and references: docs/cli.md gains a "Chat sessions" section documenting the
operator-only fail-closed list, directory defaulting/rejection, chat_directories
(home first, deduped, bounded 8) and why a dedicated request was chosen.
internal/author/skill/references/operations.md's stale "Brokered OpenCode chat"
text (chat_create unbrokered, run_steps filtering, "listed the owned scratch
session" evidence) is rewritten to the operator-session registry, the fail-closed
filter, directory defaulting and the corrected live-test wording. No new
reference file, so internal/author/install.go's inventory is unchanged.
Checked for staleness elsewhere: README.md, the docs/ topic pages and the
packaged server/TUI templates carry no chat-session ownership claims, so none
needed updating.
Verified: gofmt -l clean; go vet and go build ./... clean; go test -count=1
./internal/pipeline/... ./internal/protocol/... ./internal/opencode/...
./internal/server/... and the full go test -count=1 ./... pass.
Combine the two reviewed versions of docs/pipeline-performance-review.md.
- Local (main) review: the exact 201939-byte runs.json capture, the three
final_result_validation sub-shapes, and the 5-to-4 unresolved busy-wait
correction.
- Incoming (lane-t2) review: both captures (artifacts/222/2 and
artifacts/222/4), both stat snapshots (134 succeeded / 3 active and
135 succeeded / 2 active), plus the server-side rejection, deploy-wait,
device-lock and refined improvement-ranking analysis.
Checked: no conflict markers remain anywhere in the tree and the two sides are
composed without duplicated headings or dead text. This is a documentation-only
change to a dated analysis document; the packaged templates, the README and
topic docs, and the packaged authoring skill references are not made stale by
it, so nothing further needs updating.
Combines lane-go's typed omni search, launch-time model overrides, TUI
artifacts view, run-state websocket push, and the "reflect the change where
it belongs" committer rule with the Templates gallery, chat/omni-search and
other reviewed work already on main. The 12 files both sides touched keep
both intents composed rather than dropping either side: the omni search keeps
the typed search contract (CLI `pipelines search` and the TUI popup with type
badges and marked snippets) alongside the run-list quick filter; cli.md and
ui-ux-review.md document both the search rework and the artifacts view;
orchestration.md, harnesses.md and operations.md keep the model-override and
reflect-where-it-belongs guidance; and the protocol/CLI/server/TUI code keeps
the new search, run-event, override and artifacts paths alongside the existing
run, title and help surfaces.
Checks before committing:
- go build ./... -- pass
- go vet ./... -- pass
- go test -count=1 ./internal/... ./cmd/... -- all pass
Doc check before committing: nothing needs updating. The lane's own docs and
references (docs/cli.md, docs/ui-ux-review.md, and the orchestration,
harnesses and operations skill references) already carry the new features.
format.md and the packaged templates already describe the line-oriented result
format and the human decision stage from the earlier lane-go merge. The root
README already describes the omni search popup. Model overrides, the search
command, run events and the artifacts view are runtime/CLI/TUI surfaces that
cli.md documents; no template, README or topic-doc edit is required by this
merge.
Bring the packaged starters and the pipelines skill up to the guidelines the
project now works to.
Templates:
- task and three-stage now end in a committer stage that stages the union of the
runner's captured input.server_changed_files and the producer's declared
changed_files, runs the repository's checks, commits locally and never pushes;
their producers no longer commit.
- Every model/agent prompt states the line-oriented result contract (outcome on the
first non-empty line, "# output" JSON map, other "# <heading>" sections kept
verbatim as evidence) and an "# evidence" section for exact commands and results,
with proportionate verification and no fabricated checks.
- Stages that can write save their reports, logs and screenshots into the runtime
artifacts directory.
- Remove the summary starter: a tool-free single-prompt text transform with no
repository interaction, artifact or commit is a format demonstration, not a
reusable workflow. No starter invents a pretend approval stage; a decision point
is a type=human stage.
Skill:
- references/format.md gains a Result format section (line form, legacy JSON
precedence, result_parse, raw-output.md, artifacts) and a Committer stages
section with the pre-commit checklist; the role-split and envelope notes mention
the line form and the committer.
- orchestration.md points at the checklist and records that a genuine gate is a
human stage; operations.md and the SKILL.md index drop the removed starter and
name the result format and committer. No new reference, so the managed inventory
is unchanged.
Docs/tests: examples/README, README, docs/cli, docs/first-version-testing, the CLI
help example and the smoke script track the four starters; catalog, tool-role,
server, tui and pipeline tests are updated, with a new test pinning the committer
ending and server-captured change set.
Commands run: go build ./...; go vet ./...; go test ./...; python3 -m unittest
discover -s scripts -p 'test_*.py'; python3 scripts/smoke-first-install.py. All
passed. Templates inspected through an isolated CLI server (pipelines templates;
pipelines template KEY --source). No server, service or device was restarted, and
nothing was pushed.
Add a server-pushed run_event frame so a client no longer has to poll
once a second to notice run changes.
- protocol: RunEventFrame/RunStepDelta compact delta (run id, workspace,
status, outcome, current stage, completed-step count, timestamps and an
optional single step delta), plus subscribe/unsubscribe/run_event types
and the optional RunEvent/RunIDs message fields. All fields optional so
older peers ignore them.
- server: runEventHub with per-connection subscriptions scoped to a
workspace (and optional explicit run ids), one bounded writer goroutine
per subscription, slow-subscriber drop, per-client subscription cap and
a ~220ms per-run coalescer that flushes pending deltas before a terminal
frame.
- runner: emit deltas on created/queued, queued->running and step start,
human waiting, step finish (outcome, target, diagnostic, artifacts and
completed count), terminal finish, cancel of a waiting run and
decide/resume; emitRun is a no-op without a hub.
- websocket: subscribe seeds current state before the ack, unsubscribe and
connection teardown drop subscriptions, and pushed frames reuse the
connection write closure.
- tests: protocol golden-JSON wire shape plus websocket coverage for the
started-run frame sequence, subscribe current-state snapshot, silent
unsubscribed/never-subscribed clients, workspace isolation and a
bounded coalescing frame count.
- docs: note subscribe/unsubscribe/run_event in docs/cli.md; TUI and
Android still poll in this release.
Protocol: replace the loose Query/Kind/Matches/Limit search fields with a Search request object and a SearchResults response, and have the server answer search from Store.Search over the shared run projections (runFrom/runStamps).
CLI: add the read-only 'pipelines search QUERY [--type KIND] [--limit N] [--json]' command with usage/help, and document the typed targets, ranking and bounds in docs/cli.md.
TUI: the '/' popup keeps type-to-search, up/down, Enter and Esc, renders one ranked list with kind badges and a bracketed (non-colour) match snippet, and Enter opens the matched pipeline, run, step, artifact or field; footer text updated to match.
TUI: add a dedicated run artifacts view ('A') with open/copy of recorded files, and move artifacts out of the run-detail File changes section (artifactCaptureNotes).
Tests: add Store.OpenReadOnly for read-only inspection of a live database plus pipeline/server/TUI search tests and artifacts tests, including env-gated live checks.
Add `pipelines run --model PROVIDER/MODEL` and repeatable
`--stage-model STAGE=PROVIDER/MODEL`, resolved with precedence
per-stage > whole-run > the model pinned in the pipeline version.
- A shared pure resolver (`pipeline.ParseModelOverride` /
`pipeline.EffectiveModels`) owns the precedence and validation: every value
must be a `provider/model` pair (`stage.ValidModel`), every stage key must
exist in the pinned graph, an unknown key fails naming the valid keys, and a
per-stage key that names a non-model stage is refused.
- The server validates against the pinned version before admission (no run row
is ever inserted for an invalid request), persists `model`/`stage_models` on
the run and `provider`/`model` on each step, applies the effective pair to a
clone of the stage definition so the stage and its repair/formatter path share
it, overlays the returned run graph with the effective pair (presentation
only), and reuses the recorded overrides on retry.
- The run record echoes the overrides it was launched with and each step records
the provider/model it actually ran with; the TUI Evidence pane renders that
effective pair. The pinned pipeline version and `show --version N` are never
modified.
- CLI help, `docs/cli.md` and the packaged authoring skill references document
the flags and the precedence. A TUI override picker remains a documented
follow-up; the CLI is the deliverable.
Tests: pure precedence/validation table tests, store round-trip and
request-key-mismatch plus migration, server admission/application/overlay/retry
with a controlled executor, CLI flag/help/malformed-value tests, and a TUI
evidence test.
Integrates nine commits of reviewed work from the lane-go branch after the
automated resolver failed on this merge five times (each attempt dying on the
malformed-result defect whose fix is contained in this same merge).
Integration decisions:
- Search: kept main's shipped design (Store.Search + SearchResponse.Results) and
dropped lane-go's parallel, older attempt (an unused Message.Matches field, an
absent runs.search, and two partial TUI plumbing blocks). lane-go itself did not
compile: protocol.SearchMatch was undefined and model.go referenced searchNav,
requestSearch and applyRunNav, which exist nowhere. Those partial TUI blocks are
removed; the queued TUI omni-search item will implement the surface properly on
main's design.
- Both sides' additions are kept where they are independent: run titles and
provenance, the human decision stage and its CLI/TUI surface, the derived stage
verdict, the stale-client guard, the line-oriented result format, and main's
search command.
- The search key's help label is now "/ omni search"; the two tests asserting the
old label are updated rather than the label reverted.
- docs/cli.md and the packaged operations reference carry both sides' text.
Verified: go build ./... , go vet ./... and the full go test ./... suite pass.
Exchange a build/protocol identity so an older CLI can no longer talk to a
newer native server silently:
- protocol carries ProtocolVersion and every server frame (including the
unsolicited welcome) is stamped with the server build and protocol, so a
client that never pings still learns the server identity.
- buildinfo.Compare classifies the relationship as InSync/Warn/Refuse and
names both builds; the client Watch reports one warning per connection and
returns a hard error when the server speaks a newer, uninterpretable
protocol so the caller never acts on the frame.
- client.ReceiveNotice decodes the raw frame so an unmodeled top-level field
produces a one-time "unrecognized field(s)" notice instead of being dropped
silently (the case that hid the artifacts field).
- CLI routes warnings to stderr, keeps machine JSON stdout clean and fails
non-zero on a refused mismatch; ping/connection print the client/server
relationship. The TUI surfaces the same notices through the shared log.
- scripts/setup-native.py now warns when an older `pipelines` earlier on PATH
shadows prefix/bin/pipelines, naming both paths and versions, without
installing or modifying anything else.
- Docs, the packaged debugging skill reference and README no longer imply the
installed CLI always matches the server.
Tests cover the comparison table, unknown-field detection and caching, the
server identity stamping on pong and welcome, the CLI/TUI reporting paths and
the installer PATH shadowing warning.
A new registered stage type `human` (internal/stage/human.go) has no model,
agent, tools or configs: its required `prompt` block carries the operator
instructions and its non-error edges are the selectable options. It parses,
validates, renders, exports and imports like every other type (no parser
special-case, no config keys).
At runtime the runner parks the run instead of executing: the step and the run
persist `waiting` with self-contained {prompt, options} evidence, and the run
returns without starting later stages, capturing file diffs, scanning artifacts,
holding a goroutine/timer or applying a stage timeout. The wait is durable: a
restart leaves the waiting rows untouched (RecoverRuns excludes them) and a
rebuilt runtime over the same database still accepts the decision.
`pipelines decide <run-id> [stage] --option KEY [--feedback TEXT] [--json]` and
the TUI `c` picker resolve the decision from the pinned graph in one store
transaction, record the choice and feedback as the step's evidence and resume
along edges[KEY]. An unknown option is refused with the valid list, a stage that
is not waiting is refused, and a repeated decision for an already-decided visit
does not double-apply. Cancel and retry keep working while waiting and after a
decision; a human stage is never killed by a stage timeout or max_visits, and a
`notify` policy can fire an `on=waiting` event.
Docs: the authoring skill references (format.md, operations.md), docs/cli.md and
README describe the stage, the command and the TUI picker. Tests cover stage
validation, the parsing round-trip, the store transitions, a websocket wait/decide
integration, cancel/retry, waiting notifications and a persistence-layer rebuild
(second Open + newRunner over one database, no process restart).
One query now finds anything in the system over the wire and from the CLI.
- protocol: add Search/SearchResults message types and a SearchRequest
(query, optional kind filter, optional limit) / SearchResponse (typed,
ranked matches plus truncation and scan-bound counters) pair, with typed
payloads for pipeline, version, run, step/visit, field text and artifact.
- store: add Store.Search, a read-only query over pipelines,
pipeline_versions, pipeline_runs, run_steps (+step_control) and
step_artifacts. Ranks exact name (3) > name substring (2) > body text (1),
breaks ties by recency then a stable kind/target order, and reports the
matched field. Bounds work with a 50-default/200-max result cap, a 2000-row
per-kind scan limit and a 2000-step / 1 MiB field-text scan budget.
- terms: a bare status word or lone date expression (today, yesterday, this
week, YYYY-MM-DD) selects runs; anything else stays free text.
- server: dispatch protocol.Search to stores[0].Search; read-only and
unconfirmed.
- cli: add `pipelines search QUERY [--type KIND] [--limit N] [--json]`, help
text and a BROWSE line.
- store: add OpenReadOnly so the live-database check never runs DDL.
- docs: document the grammar, kinds, ranking and bounds in docs/cli.md,
scope the TUI omnisearch to pipelines in docs/ui-ux-review.md, and add a
search bullet to the packaged operations reference.
- tests: protocol round trip, store/ranking/term-parsing/limit/scan-bound
unit tests, a server end-to-end test, and an env-guarded live check.
No new dependencies; go.mod/go.sum unchanged.
Add a bounded, never-empty title to every run. `pipelines run --title "..."`
sets it explicitly and skips model generation; otherwise the server generates
it from the prompt through the shared summariser and falls back to the prompt's
first line, recording title_source (model/fallback/explicit) and title_model.
- protocol/store: RunSummary.Title plus Label(), a set_run_title message, title
columns with an idempotent migration, CreateRunTitled, and SetRunTitle renames.
- summarise: Title/GenerateTitle/DeriveTitle/ExplicitTitle bounded to TitleCap.
- runner: generate the title outside the admission lock and only for a request
that starts a run; a replay reuses the stored title and an explicit title
skips the model entirely.
- CLI: `--title` on run and a `title <run-id> "<title>"` rename command; human
`runs` and `inspect` show the title beside the pipeline name and version.
- TUI: the run list row, run detail header, Home run cards and last-run line,
and the pipeline Results line show the title via Label().
Tests cover storage/migration/fallback, explicit-title and rename, the
end-to-end CLI flow, and title rendering; CLI and operations docs updated.
A model stage whose final result was malformed failed the whole run even when
the work and evidence had survived, because the only recovery was an isolated
formatter call on a fixed 30-second deadline that could time out on its own
(run 55, ui_reviewer of pipeline 9 v6).
Add an ordered, deterministic local repair pass (internal/stage/result_repair.go)
that runs before any model call: (a) append missing closing delimiters via the
existing closeJSONContainers; (b) remove one unambiguous trailing comma before a
closing } or ]; (c) insert exactly the single comma/colon the JSON parser reported
at its byte offset. Every candidate must pass losslessSyntaxRepair(original,
candidate) and decodeModelResult before it is accepted, so no field value is
invented, removed, reordered or rewritten. Ambiguous payloads (an unescaped quote
or colon inside a string value, or a stray delimiter with no single completion)
return not-ok and fall through to the bounded model re-emit rather than guessing.
stageResultText still strips surrounding prose and a single code fence first;
model_prompt.go now also strips prose around a single balanced-but-malformed
object span so the deterministic pass sees just the object.
Replace the fixed 30-second formatter deadline with repairDeadline(payloadBytes,
remaining), which grows monotonically with payload size, has a floor, and is
clamped to the attempt's remaining budget minus a safety margin, so the stage
context remains the outer bound and a large result is not guaranteed to time out.
The one-request-per-attempt, 32 KiB bound and the deny-all, retained, new-session
property of RepairFormat are unchanged for OpenCodeClient and PiClient.
Record an explicit recovery status on every terminal path: repaired, partial or
unrecoverable, plus a byte offset. A candidate that is valid JSON but still fails
envelope validation is marked partial and never returned as a completed result;
the unrecoverable path retains the bounded original payload, the precise parse
error (including its byte offset) and surfaces the status in the FINAL RESULT
VALIDATION diagnostic.
safeToReplay is intentionally unchanged. The deterministic local repair and the
fresh deny-all, no-tools, retained formatter session are independent of the
stage's tool set and never re-prompt or replay the admitted agent session, so a
shell-enabled review stage gains malformed-result recovery without any replay of
admitted work. Risk: no change to mutation safety; the only added cost is one
bounded formatter call, already budgeted. Replayability is not extended for shell
stages.
Docs and packaged skill references (docs/model-results.md,
internal/author/skill/references/{format,debugging,verification}.md) describe the
three-tier recovery, the status words and the derived deadline; the safeToReplay
decision and its risk are recorded there alongside the commit.
Tests add mocked, offline coverage for the deterministic and partial paths, a
repairDeadline monotonicity/floor/clamp table, and a shell-stage regression
proving a recoverable malformed result does not fail the run or replay tool work.
Native installs left Docker-era harness profiles in harnesses.json, so every
authoring launch failed trying to reach a Docker service, and a retained draft
bound to the old Docker server was silently projected onto the configured one.
- harness: add Profile.Mode and VerifyDockerLink as the single mode/verification
helpers. `harness setup --host` configures or converts a host profile and
clears docker_directory; reconfiguring a Docker-linked profile re-verifies the
recorded directory still owns compose.yaml and fails naming it instead of
saving a link that cannot launch. Setup's summary and `harness list` (via the
new List/ListView shape) report the resulting mode and, for Docker, the
directory, without changing the stored Config schema.
- setup-native.py: after build/install-skill it writes host (no docker_directory)
profiles for the detected harnesses, defaulting to the detected OpenCode profile
rather than a stale pi default, taking models from --model or the existing valid
profile and never inventing one; it clears a stale Docker link and preserves
unrelated keys/profiles. Detection-only: no harness install, upgrade or download.
- draft: add Draft.Resolve, the shared mismatch helper, which projects a draft
onto the configured server and returns a dual-URL notice. CLI validate/submit
and the TUI draft browser use it so a foreign draft is never silently
retargeted; the TUI pre-wraps the notice to the panel width.
- Tests cover the Docker->host and host->host transitions, the missing-directory
failure, installer write/migration (Python), and the CLI/TUI notice, using the
real config file path in a temp dir.
- Update help text, README, docs and the packaged authoring skill reference to
describe host as the default and the Docker-linked case.
Fix four stage failure-handling and observability defects (A2, A3, A6, A9).
- A2: add safeToReplay(def) as the single definition of retryable post-admission
work - only an explicit tools block that selects neither edit nor shell. The
agent/pi WorkStarted guards now break only when the stage is not safe to
replay, so read-only stages genuinely retry a post-admission timeout while
mutating and legacy-bundle stages still never replay admitted work.
- A6: re-emit a malformed final result on an explicit read-only stage up to the
retry budget, preserving format_repairs evidence; mutating stages keep the
immediate return and their session.
- A3: timed-out stages retain usable evidence. waitForSessionIdle records one
bounded sanitized OperationEvidence on deadline; the agent deferred cleanup
does a bounded best-effort latest-assistant readback and settles knowable V2
usage; RetainSession adds a retained_session pointer to failed step
transcripts so the session is visible beneath the BoundTranscript threshold.
- A9: a stage outcome routed to #failure now yields a non-empty run diagnostic
("stage <name> returned outcome <outcome>") while preferring an existing step
diagnostic.
Adds focused stage and server tests for retry safety, malformed-result
re-emission, timeout evidence retention and run-level diagnostics; updates the
packaged skill references and docs/cli.md, docs/model-results.md.
Every agent stage now writes into a per-run/step artifacts directory under
the data dir (<data>/artifacts/<run>/<step>), passed to Pi as
PIPELINES_ARTIFACTS_DIR, exposed on the OpenCode client env seam, and stated
in the agent prompt boilerplate so agents save images, screenshots, reports
and logs there.
After each step the server scans that directory with a bounded, symlink- and
traversal-safe inventory (os.OpenRoot + Lstat + O_NOFOLLOW) recording name,
size_bytes, content type (extension then 512-byte sniff fallback) and URL,
enforcing max files, per-file bytes and total bytes while counting skipped
and truncated entries. A missing, unreadable or oversized directory yields
only a best-effort diagnostic and never changes the step outcome.
The list is carried on protocol.RunStep as Artifacts []StageArtifact plus
skipped/truncated counters (omitempty, backwards compatible), persisted in a
new step_artifacts table keyed (run_id, sequence) alongside the
notifications/file-changes tables and loaded by GetRun.
GET /artifacts/{run}/{step}/{name} on the existing handler serves the bytes
with http.ServeContent, so Content-Type, Content-Length, HEAD and Range
(206/416) come from the stdlib; unknown runs/steps, absolute paths,
traversal, symlink escapes and non-regular files are refused.
The TUI lists each selected step's artifacts (name + human size) in the
retained-evidence section and adds an artifacts summary in the style of the
file-changes summary. Adds docs/stage-artifacts.md linked from README and an
artifacts subsection to the packaged operations skill reference.
Tests cover the scan records and caps, missing/oversized directories,
HTTP HEAD/Range/traversal/symlink/unknown refusals and protocol round-trips.
Track each active run's resolved workspace alongside its cancel function
in a single runner.active struct map. A new request key is now refused
only when an already-active run is changing the same resolved workspace;
the refusal names the conflicting run id and advises waiting or using a
different workspace. Workspace resolution is unchanged (default cwd,
absolute request workspace, EvalSymlinks), so two spellings of one
directory still compare equal. The conflict check and registration stay
inside the existing r.mu critical section, so concurrent starts for one
workspace cannot both pass. Idempotent repeats of an active request key
and the restart-recovery guard are unchanged.
Add concurrency_test.go covering concurrent different-workspace runs,
same-workspace refusal, symlink/default-cwd equivalence, idempotent
repeats, restart recovery and retry workspace scoping; strengthen the
runner_test.go refusal assertion. Update docs/cli.md,
docs/first-version-testing.md and the packaged operations skill reference
to describe per-workspace concurrency.
Assisted-by: DeepSeek V4.1 Flash
The native install hardcoded -addr 127.0.0.1, so the server was unreachable from
the phone: the emulator worked because it proxies to the host loopback, but a
real device could not connect even though ntfy (bound to 0.0.0.0:8090) worked.
The bind address is now a manifest setting (server_address() in manage.py, with
older manifests still defaulting to loopback) and setup-native.py records it,
defaulting to 0.0.0.0 like the Docker install did and offering
--bind-address 127.0.0.1 for a loopback-only server. An invalid address is
rejected, and setup prints the phone client URL.
Verified: scripts test suite 116 tests OK, and after reinstalling the server
listens on *:8080 and answers {"healthy":true} on 127.0.0.1, 10.0.0.75,
10.0.0.249 and the tailnet address.
Add scripts/setup-native.py and make ./install (and --native) build the server, the CLI
and ntfy from source into ~/.local/share/pipelines, detect an existing host OpenCode
and Pi instead of installing them, install the packaged authoring skill, migrate an
existing Docker database and ntfy auth store, save the host client default and start
both services. ./install --docker keeps the previous Docker server + ntfy
installation unchanged.
ntfy is compiled from its pinned Go module on every host because upstream publishes
no macOS server binary (its darwin asset is built with -tags noserver); its cgo
SQLite driver is why a C compiler is now required natively. The ntfy credential
bootstrap and the client default writer are shared by both installers,
installation.Load resolves symlinked prefixes, the Docker migration copies the
SQLite write-ahead log so the newest definitions and runs are not lost, and the
account subcommands read the generated configuration through NTFY_CONFIG_FILE.
Verified on macOS: 115 Python tests, go build/vet/test, and scratch installs that
migrate 9 pipelines and 31 runs, build ntfy v2.30.0 and start both services healthy
on spare ports before stopping them.
Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers.
Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent.
Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
Make OpenCode authoring responsive and expand the managed skill references. Add conflict-aware import/export, real-provider reference workflows, and tracked V2 generation for reliable budget accounting.