Commit Graph

173 Commits

Author SHA1 Message Date
alan 36fad7d130 Merge lane-go: keep the lane's reviewed work
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.
2026-10-17 02:04:58 +01:00
alan c164d08cc5 Merge lane-c: keep the lane's reviewed work
Combines lane-c's Templates gallery and detail view with the chat and omni-search work already on main (lane-t2). The three files both lanes touched keep both intents: AppViewModel.kt keeps refreshTemplates/createFromTemplate alongside the search/chat flows, PipelinesApp.kt keeps both the Templates and Chat destinations, and graph/Artifacts.kt adopts the shared galleryGrid fitting while keeping the tile-gallery refactor.

Doc check before committing: nothing needs updating. This is an android/-only merge. The app's topic doc (android/README.md) already documents the Templates destination (lane-c) and the Chat/omni-search work (lane-t2). The root README and docs/ describe the server CLI/TUI (whose :templates catalog is a separate surface) and are unchanged. The packaged authoring skill references (internal/author/skill/references/) mention the Android client only for APK-delivery mechanics, which this change does not alter, and the packaged templates are server-side and untouched.
2026-10-17 01:42:51 +01:00
alan 515059674d Merge lane-t2: keep the lane's reviewed work 2026-10-17 01:34:02 +01:00
alan 052ece0163 skill: match the answer's length to the question in the conciseness guidance 2026-10-17 01:31:24 +01:00
alan 18db2f913a Add a Templates gallery and detail view to the app
The server's template catalog (the list_templates command) had no surface in
the app. This adds a Templates destination to the shared SlidingPaneStack: a
measured card gallery (name, short description, stage count and its own glyph;
one column narrow, a fitting grid wide) and a detail pane that reuses the
pipeline detail's Summary/Graph/Source tabs, plus a create-from-template action
that submits a create-only draft. Stage counts come from a source the server
parsed (validate); a source that does not parse is still viewable as raw
markdown.

Added: Templates.kt (TemplateEntry/TemplateCard, the grid-column and
stage-count mapping), components/GalleryGrid.kt (the shared measured-gallery
fitting, extracted from the artifact gallery), graph/SourceView.kt
(PipelineSourceView, the one rendered-definition view, extracted from
PipelineDetailScreen), screens/TemplateGalleryScreen.kt,
screens/TemplateDetailScreen.kt, TemplatesTest.kt.
Changed: PipelinesApp.kt (the Templates destination), AppViewModel.kt
(refreshTemplates/createFromTemplate), data/PipelinesRepository.kt
(listTemplates/validateSource/createPipeline), graph/Artifacts.kt (use the
shared galleryGrid), PipelineDetailScreen.kt (use the shared
PipelineSourceView), ArtifactGalleryTest.kt (exercise galleryGrid).

Doc/state check before committing:
- android/README.md (the app's topic doc): updated. Added a Features bullet for
  the Templates destination and a dated "Templates: a gallery and a detail view"
  section, matching the per-feature convention every prior android change uses.
- Packaged templates: not touched. The server's templates are Go-side and the
  brief forbids touching the Pipelines server; this change only renders the
  catalog the server already exposes.
- Packaged authoring skill references (internal/author/skill/references/): not
  updated. They document the Pipelines harness, not the Android app, and this
  change adds no harness runtime behaviour.
- Root README and docs/: not updated. They document the CLI/TUI/server, which
  are unchanged; the Android app is documented in android/README.md.

No conflict was present: no unmerged paths and no unfinished merge, rebase or
cherry-pick, so nothing needed resolving.
Deliberately left uncommitted (other work this run did not touch, not staged):
the worktree's other WIP - components/ListScroll.kt and screens/PaneStats.kt with
their tests, and the uncommitted edits to components/SlidingPaneStack.kt,
components/States.kt, theme/Dimens.kt and components/LoadPhaseTest.kt - plus the
untracked .ui-review-*/ capture artifacts.
2026-10-17 01:30:27 +01:00
alan 3997e1bbc1 docs: pipeline performance and reliability review 2026-10-17 01:26:35 +01:00
alan c9b904186a Update templates and authoring skill to the current pipeline contract
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.
2026-10-17 01:09:42 +01:00
alan 0df0c278b0 Open stage sections as their own pane instead of expanding inline
Expanding a stage section drew its rows stacked at the section's origin:
CollapsibleSectionBody passed the section's several field composables straight
into AnimatedVisibility, which lays out a single child, so the rows overlapped at
the top of the section and only the last was visible. The shared body now wraps
its content in one full-width Column, so any multi-row section stacks its rows
under its header.

Every stage section now opens as its own pane rather than growing the stage
screen inline:

- PaneState: add the Section pane level (MAX_PANE_DEPTH = 3) and a saved
  sectionKey primitive, with backStep/popTo/encode/decode handling so one Back or
  peek pops exactly one level and the open section survives rotation and process
  death.
- StageDetailPane: the stage screen keeps a compact collapsed list of its
  sections (Artifacts, Output, Input, This run, Stage definition); opening one
  shows it as a full-window surface over the stage on a narrow window, or a panel
  to the right of the stage pane on a wide one, with its own Scaffold/TopAppBar
  title, its own scroll and its own top spacing.
- SectionHeader: a navigation mode for those rows - a static forward chevron
  (mirrored for RTL) and an "Open <section>" action instead of a rotating
  disclosure chevron and "Expand/Collapse", so assistive tech is not told the row
  expands in place. The detail screens' disclosure rows are unchanged.
- DetailTabs: drop the rememberSectionExpansion initiallyExpanded seed, whose
  last caller was the inline stage definition.
- Tests: cover the Section level's backStep, popTo, encode/decode and depth, and
  the shared stageSectionSpecs order and blank-section cases.

Sections still start collapsed, the operator's choices still persist, and each
section's content is unchanged. android/ only; no dependency was added.

Also in this diff, from the covered-identity statistics work: PipelinesApp passes
compactStats = true on its two stacks (SlidingPaneStack's statistics flag).
2026-10-17 01:08:29 +01:00
alan d578f43c5a Add a "reflect the change where it belongs" rule for committers
The packaged authoring skill's orchestration reference now tells an author
to carry the check from the brief into the pipeline: before committing, the
committer verifies the change is reflected in the packaged templates, the
repository's guidelines (README and topic docs) and the packaged skill
references, updates anything stale, and states in the commit body what was
checked or that nothing needed updating.

- brief-writing section: add a "Where it belongs" item to the brief and
  renumber the hard-constraints and publishing items.
- hard-constraints block: add a "Reflect the change where it belongs" bullet.
- Pipeline choice: extend the committer bullet with the same pre-commit
  check, keeping the existing rule that the committer stages only the run's
  changed files.

Checked before committing: the change is prose in the packaged skill
reference, so no template, README or topic-doc edit was needed; the eight
pipelines carrying a committer stage were republished with the same rule in
their committer prompt (not tracked in this repository); no other reference
is stale.
2026-10-17 01:02:48 +01:00
alan ce767c344a Merge lane-hs: keep the lane's reviewed work 2026-10-17 00:52:50 +01:00
alan 956be005c4 Merge lane-hg: keep the lane's reviewed work 2026-10-17 00:52:50 +01:00
alan cb71f35c59 Merge lane-c: keep the lane's reviewed work
# Conflicts:
#	android/README.md
#	android/app/src/test/java/net/awan/pipelines/ui/components/PaneIdentityTest.kt
2026-10-17 00:52:18 +01:00
alan 8f3036bd3b Push run state to subscribed websocket clients
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.
2026-10-17 00:43:05 +01:00
alan 889d811858 Fix artifacts-view scrolling, narrow widths and capture wording
The Artifacts view re-clamped its scroll offset to the selected row on every
render, so the tail of the list - a trailing visit that recorded none (running
or finished) and its capture summary - could never be brought on screen, and
the image marker crowded out artifact names at narrow widths.

- Decouple the scroll offset from the selection: add PgUp/PgDn (and ctrl+u/
  ctrl+d) paging, and make G/end select the last artifact and scroll to the
  tail so a trailing visit stays reachable.
- Share artifactContent/clampArtifactTop/revealArtifactSelection between
  selection and render so both agree on the same page.
- Show the [img] marker only while the width still leaves room for a usable
  name, keeping columns aligned either way.
- Advertise the scroll keys in the artifacts footer help.
- Test the omitted-files capture wording, trailing-visit reachability via
  G/end and page scroll, and narrow-width no-overflow; render both the top and
  the scrolled tail in the env-gated live capture test.
- Update the packaged operations reference for the A artifacts view.
2026-10-17 00:24:42 +01:00
alan 865993b200 Rework omni search onto a typed search contract and add a TUI artifacts view
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.
2026-10-16 23:48:38 +01:00
alan 98713e55f5 server: hand the committer the captured changed-path set
The committer staged only the implementer's self-declared changed_files,
so an incomplete declaration silently left part of the approved change
uncommitted. The runner already records the run's real changed paths by
comparing the working tree around each step; publish that set to the
committer.

- runState gains an unbounded, deduplicated, first-seen-ordered captured
  path accumulator (capturedPaths/capturedSeen), distinct from the bounded
  changedPaths sample used only by the UI-surface skip reason.
- recordChanges folds each captured FileChange path into it in the existing
  single pass, so no second walk and no new I/O.
- publishServerChangedFiles writes the set into the input memory value as
  input.server_changed_files, called before memoryInput so the binding
  always resolves (an empty list when nothing was captured) and only stages
  that select it receive it. rebuildRunState rebuilds it from persisted
  completed steps, so a resumed run hands the committer the same evidence.
- Tests prove the committer receives the captured set distinct from and
  additive to the implementer's declared changed_files, that an omitted
  path is still present, and that the field is an empty list when nothing
  was captured.
- control.md and orchestration.md document the reserved field and instruct
  the committer to select input.server_changed_files alongside the declared
  changed_files and stage their union.

Commands run: go build ./...; go vet ./...; go test -count=1
./internal/server/... ./internal/stage/...; go test -count=1 ./internal/author/...;
go test -count=1 -run TestCommitterReceivesServerCapturedChangedPaths ./internal/server/.
All passed. go.mod/go.sum unchanged.
2026-10-16 23:44:56 +01:00
alan c41bf4f5b0 State each model stage's permitted tools in its prompt
A planner had no machine-readable view of the tool set later stages would
have, so it could emit acceptance checks that required tools (shell) the
implementer was not permitted, causing a blocked run.

modelPrompt now emits exactly one authoritative line naming the stage's
permitted tools, derived from the definition via the new effectiveTools
helper. effectiveTools reuses ToolNames: a present tools block, including
an explicit empty one, is returned as parsed; an absent block yields the
legacy mutating read/glob/grep/edit/shell bundle so it is never
misrepresented as empty or read-only. The bundle is declared once as
legacyTools and reused by tools.go, agent.go, pi.go and permissions.go.

The redundant client-side strings.Replace of the tools line is removed
from AgentClient.Generate and PiClient.Generate; the agent-only guidance
sentence is preserved by appending it in agent.go, and Pi appends a short
mapping line derived from piTools. Edit-scope and permitted-shell text,
routing, review, budgets and retries are unchanged.

Adds internal/stage/model_prompt_test.go covering explicit, absent and
explicit-empty blocks plus derivation edge cases, and a guard that the
agent prompt still carries the tools, edit-scope and shell-command text.
2026-10-16 23:34:39 +01:00
alan fae1005962 Allow launching runs with whole-run and per-stage model overrides
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.
2026-10-16 23:33:53 +01:00
alan b3188a5c6f server: skip a stage that declares a skipped edge when no UI surface changed
A stage declaring a `skipped` outcome is short-circuited with no model call
when the run's recorded file changes and artifacts touch no UI surface
(android/, internal/tui/, a presentation extension or an image artifact).
The step is recorded completed/skipped along its declared edge with a
bounded one-line reason, so a backend-only run no longer pays for a
ui_reviewer generation that can only answer ui_applicable=false.
2026-10-16 23:31:16 +01:00
alan dcd58b8a3d Reach the covered pane's full statistics and wrap its title at whole words
A covered pane's width is spent on the covered region (`identityWidth +
startInset`), and when a second level is covered `coveredEdgesDp` gives the
nearest identity that region less the thin older edge (`startInset + minTouch`;
the leading gesture inset cancels), i.e. `identityWidth - minTouch`. Flooring a
statistics-bearing identity at the full block alone (`MIN_COVERED_PANE_WIDTH_DP +
PEEK_WIDTH_DP`, 168dp) therefore left the nearest edge at 120dp, below the
`paneStatTier` Full boundary, so a pipeline's last-run/age and average lines were
filtered out at every depth a pipeline is ever covered. `coveredIdentityWidthDp`
now floors a statistics-bearing identity one touch target above the block
(`+ minTouch`), so the nearest edge is exactly 168dp and reaches Full, while the
single-covered and title-only cases are unchanged and the active pane width still
does not depend on depth.

The covered title also broke mid-word in a narrow strip ("Complete a Task" ->
"Complet"/"e a Task"). `wholeWordTitle` now packs the title greedily onto
whole-word lines and, once they are full, drops the remaining words and
ellipsizes the last line at a word boundary; a word wider than the whole strip is
the one exception, ellipsized to the width because it has no internal boundary.
It takes an injected `measure`, so the packing rule is unit-testable without a
device, and `PaneIdentity` measures with the same `cardTitle` role it draws with.

`PaneIdentityTest` adds the pure cases: the width-degradation tiers, the
statistics-bearing width floor, the nearest-edge geometry at depth 2 (which fails
without the `+ minTouch` reserve, so it pins the defect), and the whole-word
wrap/ellipsis/oversized-word/no-room cases. `android/README.md` records the
corrected geometry, the fix and the run's build/test evidence.

android/ only; no new dependency, no server field, and no server/Go/installer/
Docker change. Build and unit tests only (no device): 300 tests, 0 failures.
2026-10-16 23:30:47 +01:00
alan 80232a4ffe Add omni search: ranked mixed results in the TUI and CLI
Back the TUI "/" popup with the server's search command and add a matching
pipelines search CLI command.

- protocol: SearchRequest/SearchResponse and per-kind SearchResult payloads,
  one shared Label for the six-kind badge dispatch and RuneIndexFold for
  case-insensitive matching.
- pipeline: the read-only, ranked, bounded Store.Search implementation.
- cli: search QUERY [--type KIND] [--limit N] [--json], printing the shared
  label plus a text-field snippet when present.
- tui: type to search, up/down to choose, Enter to open and Esc to cancel over
  one mixed ranked list, with short type badges and a bracketed non-colour
  match marker; Enter navigates to the matched pipeline, run, step, field
  section or artifact entry.
- tests: protocol and TUI coverage, including an env-gated live test against
  the running server.
2026-10-16 23:03:17 +01:00
alan 0937327e8c android: correct omni-search IME docs to the declared adjustResize mode
The soft-input comments in the manifest, PipelinesApp.kt and android/README.md
still described `adjustNothing`, a mode the activity no longer declares. MainActivity
uses `android:windowSoftInputMode="adjustResize"` and the app draws edge-to-edge, so
the Compose window inset (WindowInsets.safeDrawing) is the single source of the IME
geometry and is applied once by the surface that owns it.

- AndroidManifest.xml: rewrite the soft-input comment to describe adjustResize, why
  the app is edge-to-edge and reads the IME from Compose window insets, and warn
  against changing it without re-checking the chat composer.
- PipelinesApp.kt: correct the bottom search column comment that claimed the activity
  declares adjustNothing and the window is never resized for the IME.
- android/README.md: correct the omni-search results-panel section that claimed the
  IME inset was counted once because of adjustNothing; now records the declared
  adjustResize mode, the edge-to-edge single source of IME geometry, and the chat
  composer's imePadding.

Documentation only; no rendered surface or behaviour changes. The omni-search entry
point and pill morph already exist at this HEAD; this reconciles the stale wording
with the committed mode.
2026-10-16 22:48:28 +01:00
alan 910a7aa798 Merge lane-app2: the chat experience and its multi-conversation state
Integrates eight commits of reviewed chat work: the Chat destination with
several conversations, markdown transcripts, tool-call chips with an expandable
INPUT/OUTPUT panel, edit diff cards, the composer's stop control, and approval
cards. The automated resolver failed on this merge repeatedly (its own stages kept
dying on the malformed-result defect), so it was integrated by hand.

Integration decisions:
- Pill geometry: main's tokens win. lane-app2 carried private duplicates of
  DESTINATION_ITEM_SIZE/GAP and a private DESTINATION_PILL_RESERVE, added before the
  geometry-token migration; those duplicates are dropped in favour of the theme
  tokens main already exports.
- IME mode: kept lane-app2's adjustResize for the window, because the chat composer
  and the search field both raise the keyboard and the chat UI was reviewed with it.
- Protocol and view-model constants: both sides' independent additions are kept.
- ChatScreen now passes the compactLabel main's SlidingPaneStack gained, and the
  literals lane-app2 introduced before the token discipline are converted to five
  new named tokens (HAIRLINE_DP, ICON_BUTTON_SMALL_DP, TOOL_PANEL_MAX_WIDTH_DP,
  CHAT_TITLE_MAX_WIDTH_DP, CHAT_BUBBLE_MAX_WIDTH_DP) rather than allow-listed.

Verified: assembleDebug plus the full Android unit suite (409 tests) pass,
including the geometry enforcement test.
2026-10-16 22:27:30 +01:00
alan bd09c55c47 Merge lane-go: titles, verdicts, human stage, line result format, stale-client guard
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.
2026-10-16 22:21:43 +01:00
alan aac1be18cc docs: document line-oriented model/agent result format 2026-10-16 21:49:14 +01:00
alan 3aa6ed97aa skill: add the project work ledger and session lifecycle
Add references/work.md: one durable ledger per project (queue, active, done,
failed), the start/pause/resume/status operations, per-item directives, a
restart-safe queue driver, sleep autonomy and a conciseness rule. Index it from
SKILL.md and add it to the installed inventory.
2026-10-16 21:42:52 +01:00
alan 1fe7edb30f android: document the omni-search results panel
Add a "Omni-search results panel (16 Oct 2026)" section to android/README.md
describing the panel that sits above the omni-search field: its placement above
the input and IME, the badge/title/secondary row layout with a bold+underlined
snippet span, the debounced query with stale-response gating and no flicker to
empty, the loading/empty/error states, and result-to-target navigation for every
kind. Records the verification evidence (unit tests and assembleDebug, APK hash
and size, published APK and LAN URL) and notes what was left to the visual review.

No source behaviour changes: the panel logic already existed; this pass verified
it and filled the documentation gap.
2026-10-16 21:42:33 +01:00
alan b05277a57d Add line-oriented result format for model and agent stages
Introduce a short, markdown-ish result format whose first non-empty line is
the declared outcome and whose "# output" section carries the routing data,
so stage output stops carrying multi-kilobyte prose inside a JSON envelope.

- New internal/stage/line_result.go: resultFormat() gates legacy JSON ('{'
  first) vs the new line format; decodeLineResult() parses outcome-from-first
  line, requires a JSON-object "# output" section, stores extra sections
  verbatim under normalised keys, and records a reserved result_parse status
  (parsed/partial/failed). Failures return a salvage Result plus
  ErrInvalidModelResult, and never route an undeclared outcome.
- internal/stage/model.go: write the raw response to raw-output.md (0600,
  best-effort) before parsing, and route the line format through
  decodeLineResult while leaving the JSON path (stageResultText ->
  decodeModelResult -> repairModelResult) unchanged.
- internal/stage/agent.go: agentResultText returns line-format text verbatim
  so the "# output" body is not stripped by the JSON-object extractor.
- internal/server/runner.go: merge a non-empty salvage Result into the error
  envelope under "salvage" on failure (a no-op for the legacy JSON path).
- internal/stage/line_result_test.go: raw-text fixtures covering happy path,
  missing/undeclared outcome, missing "# output", best-effort extras,
  adversarial prose, legacy JSON unchanged, >=64KB responses, and
  raw-output.md written before parsing.
2026-10-16 21:34:33 +01:00
alan 9b9f12f48e Merge lane-e: keep the lane's reviewed work
Combine lane-e's reviewed Android UI work with main's lane-c/lane-d work.
Conflicts resolved by keeping both intents:
- android/README.md: both documentation sections retained
- graph/StageDetailPane.kt: lane-e pane plus local section changes
- screens/RunDetailScreen.kt, RunHistoryScreen.kt: lane-e features and
  local work both preserved
- screens/PipelineListScreen.kt: new row layout and remembered
  sort/filter controls kept together
2026-10-16 20:46:56 +01:00
alan c4833870a9 Merge lane-d: open stage sections as their own pane
Combine the local list-scroll/covered-edge and hoisted pane wiring work with
lane-d's Section pane level, sectionKey persistence, three-way back
descriptions and single-Column CollapsibleSectionBody. Both intents survive:
conflicts in README, PipelinesApp, StageDetailPane, PaneState, Sections and
their tests were resolved by composing both sides, without conflict markers.

Build: ./gradlew :app:assembleDebug
Tests: ./gradlew :app:testDebugUnitTest (322 tests, 0 failures)
2026-10-16 20:37:07 +01:00
alan fa0998b35d Merge lane-c: keep the lane's reviewed work
Combine lane-c's incoming work with the local branch.

- PipelinesApp.kt was the only unmerged path: resolution is purely additive over HEAD, keeping HEAD's hoisted selection/onSelectionChange and pendingNav/onPendingNavResolved while adding lane-c's listState wiring and compactLabel/compactIcon.
- graph/StageDetailPane.kt and theme/Dimens.kt auto-merged and retain both sides' changes.
- Incoming branch af68a62 preserved as second parent.
2026-10-16 20:32:11 +01:00
alan e2147b043b android: share one LabelChip and drop the dead Run.artifacts flag
Consolidate the omni-search row type badge and the stage-type chip into a
single ui/components/LabelChip composable, so the chip's shape, colour and
type live in one place and a second copy cannot drift.

Remove the unused SearchTarget.Run.artifacts field: an artifact hit and a
step hit now resolve identically to the visit's stage pane, whose fixed
section order already leads with the artifacts. Correct the
SearchUiState.failed KDoc to describe how prior results are kept, and
update OmniSearchResultsTest to the simplified target.
2026-10-16 19:53:10 +01:00
alan b083cbad34 android: drop the pipelines list inline search, add a filter-menu name facet
The pipelines list carried its own "Search pipelines" field while the app also
has the omni search, so the list offered a second, narrower way to do the same
job. Remove that field and move name narrowing into the list's filter control,
keeping "filters narrow one list" separate from "search finds across the system".

- PipelineListScreen no longer owns a `query` state or draws the
  OutlinedTextField; the list is now the first child under the app bar, so the
  reclaimed space comes from layout with no compensating spacer or new dp value.
- PipelineFilters gains a free-text `name` facet beside presence/lastRunStatuses,
  applied by filterPipelines through the new pure pipelineMatchesName
  (case-insensitive contains, blank means any). It needs no run history, so it
  applies as soon as pipelines load while the run facets still wait for runsKnown;
  activeCount and isActive include it, and hasRunFacets gates just the run facets.
- PipelineFilterControl opens with a Name section holding a single-line
  PipelineNameFilter labelled "Pipeline name contains"; the shared Clear filters
  resets it with the run facets and the active-count badge counts it.
- SettingsRepository/AppViewModel persist the name under pipeline_filter_name.
- Empty-state messages reflect the name-only miss.
- ListFilterTest covers the new name narrowing (+4 cases) and storage parsing.
- android/README.md documents the change and the build/APK evidence.

The runs list never had an inline search field, so nothing was removed there.
2026-10-16 19:50:19 +01:00
alan e7c4b8f71f Merge branch 'main' into lane-e 2026-10-16 19:30:13 +01:00
alan 80f7b0adbc android: add omni-search entry point and pill morph
Add the fourth Search destination to the floating bottom container and
morph that container into the omni-search field.

- PipelinesApp: the destination pill gains a Search icon; tapping it
  animates the icons out and turns the same Surface into a focused text
  field whose size and position derive from the pill's own layout and the
  window insets rather than fixed pill sizes. Back, the back gesture and a
  scrim tap play the reverse and restore the pill with its previous
  destination still selected. The open field covers the content behind a
  scrim and shows a results panel above it.
- OmniSearch: pure state model (open/focused/query) with the open, dismiss,
  focus and query transitions and a Bundle-able Saver, so an open field
  survives a saved-state round trip.
- OmniSearchResults / SearchResultsPanel: map the typed search reply to
  rows and render the ranked results, keeping the last accepted results
  while a newer query loads and reporting a failure without blanking.
- AppViewModel / PipelinesRepository: drive queries over the existing
  transport with debounce and reply ordering; the server search command
  arrives in a later item, so a reply is classified by envelope type and a
  non-search_results reply is reported with a clear message instead of
  being mis-parsed, never a crash.
- Message: SEARCH / SEARCH_RESULTS constants and the SearchRequest,
  SearchResponse and per-kind result payloads.
- AndroidManifest: adjustNothing so the app reads the IME from Compose
  window insets and the field is not cleared twice by a window resize.
- Dimens: spacing for the search surface.
- Unit tests for the state model (pill, opening, focused, dismissed and
  restored after the Saver round trip) and for the result-row mapping.
2026-10-16 19:29:40 +01:00
alan 007639948c Show the stage verdict atop the stage pane, with clickable artifacts
Mirror the server's derived verdict onto RunStep as a nullable
StageVerdict ({option, reason, reason_source, artifacts}, absent -> null),
matching internal/protocol/verdict.go.

Render a StageVerdictBlock at the top of the run pane, below the visit
tabs and above the facts, only when a verdict is present - a null or
empty verdict draws nothing, never an empty heading. The chosen option is
a ColoredChip in the stage outcome's existing colour; the reason is plain
pipelinesText().body that wraps without a maxLines clip.

The artifacts the reason names become inline, tappable references
(image/video open the shared ArtifactViewer, anything else uses the
existing openArtifact action) plus the same references as compact
FlowRow chips. Referenced names resolve to the visit's recorded
artifacts, deduplicated and in recorded order; reason text is split
around those names longest-match-first. No new dependency and no new dp
or sp literal.

android/ only.
2026-10-16 19:17:26 +01:00
alan af68a62ab8 Measure the covered pane edge instead of spending a fixed budget
The covered panes spent a fixed 224dp (PEEK_BUDGET_DP) whatever the window
width, so a folded window lost over half its width and the active pane was
squeezed as levels were added. Derive the covered region at runtime from the
compact identity a covered edge must show - an icon plus the shortest label
that identifies the pane, measured with the app's own type role and floored at
the platform minimum touch target - plus the leading gesture inset.

coveredEdgesDp now returns edges that sum to exactly that region, so the active
pane opens at hostWidth - region and its width is identical at every depth:
opening a level only adds a thin edge inside the region. The nearest covered
level shows its identity, one older level is a thinner touch-target edge, and
older levels fold into a count rather than accumulating width; tapping an edge
still pops everything above it. Removes PEEK_BUDGET_DP, MIN_ACTIVE_PANE_WIDTH_DP
and the peekBudgetDp/peekStripsDp budget split from Dimens.kt and
SlidingPaneStack.kt. PaneIdentity gains the pane-kind icon drawn above the title
at the vector's own measured default size, and each destination passes its
compact label/icon.

The touched files also carry the in-flight covered-pane statistics and list-scroll
plumbing they depend on (PaneStat/paneStatTier/visiblePaneStats, per-destination
LazyListState); the remaining pieces of that work remain uncommitted.
2026-10-16 18:50:36 +01:00
alan 8c1eea53a9 Report a stale client and refuse an unreadable newer server
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.
2026-10-16 18:37:01 +01:00
alan 8b0d7b1ecb Show a run's title beside its pipeline name
Surface the operator's title for a run so two runs of the same pipeline
read as clearly different goals, with the pipeline name kept as context.

- protocol: optional nullable `title` on RunSummary and RunDetail; absent
  or blank degrades to the pipeline name.
- ui/RunIdentity.kt: one shared fallback (`runLabel`) and two-line identity
  (`runIdentity`) so the list, detail header and stage pane never spell a
  run differently; a titled run shows the pipeline name + version as a
  second line, an untitled run keeps the pipeline name as its only line.
- runs list / run detail / stage pane use the shared identity; the status
  chip, duration and metadata layout are unchanged.
- no rename affordance: the server exposes no title and no `set_run_title`,
  so the app does not fake renaming.
- tests: RunIdentityTest (5) plus ProtocolModelTest cases for a present and
  an absent title; README documents the change and its verification.
2026-10-16 18:26:29 +01:00
alan b003872032 Show live elapsed time for running runs
A running run now shows how long it has taken so far instead of its start
time, kept live: the runs-list meta row, the pipeline list's last-run line
and the run detail summary's Duration row all read one shared rule,
runDurationText (ui/Format.kt), which reports the elapsed while executing and
keeps the stored total once the run has finished.

The elapsed is derived from the server's own start timestamp against a single
shared clock, rememberLiveNowMillis/hostResumed (ui/components/LiveTime.kt),
so it stays correct after a reconnect and never ticks while the app is
backgrounded or while no shown run is executing. WorkflowGraph's private
lifecycle read and once-a-second loop are replaced by that same shared pair.
A missing start omits the value and a future start (clock skew) reads as 0s.

Unit tests (FormatTest, PipelineLastRunTest) cover a run that has just
started, the minute and hour boundaries, a missing and a future start, and a
finished run keeping its stored total duration.
2026-10-16 18:13:50 +01:00
alan e1c531a537 Make the run summary's artifacts gallery a collapsed section
The run summary led with the artifacts gallery, but it was always open, so a
long run's grid pushed the run's own facts below the fold. The gallery now
sits in one collapsed-by-default section in the same place, with a header that
describes itself while collapsed.

- RunDetailScreen.kt: RunSummaryTab renders the gallery through the shared
  LazyListScope.collapsibleSection, keyed "artifacts" and seeded with
  rememberSectionExpansion(run.id), so a run opened fresh starts collapsed and
  the operator's choice persists per run across tab switches and config
  changes. Order is unchanged: the section still leads the summary and the
  facts item follows it. Expanding composes the unchanged ArtifactGallery;
  collapsing composes nothing.
- ArtifactGroups.kt: new pure runArtifactsHeader(steps, executing) builds the
  self-describing header - singular/plural title, recorded count and
  "· partial capture" when any visit excluded or omitted files; empty runs
  reuse the shared artifactsEmptyMessage. Its count equals runArtifactGroups'
  tile total, so the header and the expanded gallery cannot disagree.
- ArtifactGroupsTest.kt: four header tests covering count, singular vs plural,
  the partial-capture notes and the empty case, plus a count-matches-gallery
  assertion.
- android/README.md: records the change and its verification evidence.

Android only; no new dependency, no run started from the app, device work on
the operator's Pixel 10 Pro Fold (58281FDCG000JF). Verified: 269/0/0/0 unit
tests, clean assembleDebug and published APK LAN URL 200.
2026-10-16 17:51:56 +01:00
alan 98bbc2deac Report recorded decision evidence and harden the Pi artifacts env
Refinements on top of the human decision stage (a6aff47):

- `pipelines decide` now reports the feedback the server actually stored for
  the chosen option, so a repeated (idempotent) decision shows the recorded
  evidence instead of the ignored request text. A repeated decision is covered
  by a new assertion that also checks the step output does not change.
- The decision option/feedback output keys are defined once in protocol
  (DecisionOptionKey/DecisionFeedbackKey) with a DecisionEvidence reader, and
  the store and CLI use them instead of bare string literals.
- piEnvironment drops any inherited PIPELINES_ARTIFACTS_DIR before spawning Pi,
  so the artifactsDir argument is authoritative and an ambient directory (for
  example Pipelines' own when a stage runs inside another stage) never leaks
  into a child that was given none. Covered by a test with an ambient value set.
2026-10-16 17:25:48 +01:00
alan 95150c79c5 Render every artifact in the shared gallery, with file-type icons
Standardise the artifacts gallery so the run summary and the stage pane
render one tile per artifact instead of images as a grid and everything
else as a plain list.

- Artifacts.kt: ArtifactTile now covers both shapes - an image/video fills
  the cell with a thumbnail (a video shows its poster frame with a play
  badge), anything else shows its file-type icon with the name and size
  beneath it; the grid, share/copy actions and multi-select are unchanged
  and the capture wording is untouched.
- ArtifactType.kt (new): pure ArtifactKind classification from content
  type plus name extension fallback, and artifactIcon(kind) mapping each
  kind to a distinct glyph.
- ArtifactImage.kt: ArtifactVideoFrame/rememberArtifactVideoFrame extract
  a poster frame via MediaMetadataRetriever over an in-memory
  MediaDataSource; the shared memoized-preview scaffold is factored into
  rememberArtifactPreview.
- ArtifactViewer.kt: full-screen viewer takes a video flag and shows the
  poster frame.
- Format.kt: add isVideoContentType; drop the now-unused artifactMetaLine.
- Dimens.kt: ARTIFACT_TYPE_ICON_DP, ARTIFACT_PLAY_BADGE_DP,
  ARTIFACT_TILE_ACTION_DP tokens.
- Tests: new ArtifactTypeTest (type-to-icon mapping, extension fallback,
  distinct glyphs); FormatTest updated for the removed helper.
- android/README.md documents the pass.

android/ only; no new dependencies beyond material-icons-extended.
2026-10-16 17:13:35 +01:00
alan 12976ba372 Open stage sections as their own pane instead of expanding inline
Expanding a stage section rendered its rows stacked at the top of the section: CollapsibleSectionBody passed the section's several field composables straight into AnimatedVisibility, which measures a single child, so all rows were placed at the section origin and only the last (Memory) was visible. Fix the shared body by laying its content out in one full-width Column, and make every stage section open as its own pane rather than growing the stage screen inline.

- PaneState: add the Section pane level (MAX_PANE_DEPTH = 3), a saved sectionKey primitive, and the matching backStep/popTo/encode/decode handling so one Back or peek pops one level and the open section survives rotation and process death.

- StageDetailPane: the stage screen now keeps a compact collapsed list of sections (Artifacts, Output, Input, This run, Stage definition); tapping one opens it as a full-window screen on a narrow window or a panel to the right of the stage pane on a wide one, with its own title, scroll and top spacing. A shared stageSectionSpecs derives the sections for both the stage screen and the section pane, and the artifacts section keeps the shared ArtifactSelectionScaffold.

- PipelinesApp: wire the Section pane into the stack, its peeks and Back. Section content (Definition, Input, Output, Artifacts) and semantics are unchanged; sections start collapsed and the operator's choice persists.

- Tests: cover the section pane level, backStep, popTo and the shared stageSectionSpecs. Build and forced unit tests pass (262 tests, 0 failures); lint shows only the pre-existing themes.xml NewApi errors.

Android only (7 files); no dependency added, no server/Go/installer/Docker change, no run started from the app. APK published to the run artifacts directory and documented in android/README.md.
2026-10-16 17:12:13 +01:00
alan ee5cd742c2 Prove the always decision through the shared approval reply builder
Extend ChatApprovalTest so once, always and reject each go through the same
ChatProtocol.replyRequest builder plus one encode/decode round trip using the
DECISION_* constants, so no decision is asserted more weakly than another, and
add answeringAlwaysUpdatesTheCardInPlace (settled card, no actions, risk panel
retired, request still visible). Refresh the android/README.md verification
notes: 267 tests, the rebuilt APK's sha256 and byte size, the 147/3 artifact
path and LAN URL, and the emulator/device-lock notes for this pass.
2026-10-16 16:57:57 +01:00
alan a6aff47117 Add a human decision stage that pauses a run for an operator's choice
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).
2026-10-16 16:47:28 +01:00
alan 305714c30f Drive the composer's stop control and IME action from one derivation
While a turn was in flight the trailing composer button became the stop
control, but the text field's keyboard send action still checked only
canSend, so a prompt could be sent from the IME during a run even though
the visible control had become stop.

Add ChatFormat.composerAction(thread) -> ComposerAction.Send/Stop as the
single pure derivation and read it from both the trailing button and the
keyboard action, so the two controls can no longer disagree.
ChatFormatTest.composerControlIsStopWhileARunIsInFlightAndSendOtherwise
covers Send when idle and Stop while running. android/ only; no new
dependency.
2026-10-16 16:26:16 +01:00
alan 609721d53b Show pushed approvals as in-place chat cards
Render a server-pushed chat_permission as an approval card in the
transcript instead of a transient bar above the composer, matching the
reference opencode/Jarvis chat: the requested action, its resources, the
amber RISK REVIEW panel, and once/always/reject actions wired to the
server's chat_reply.

- ChatFormat: a pure approvalCard()/ApprovalCard model and one
  ChatProtocol.replyRequest() builder shared by the card's actions and
  the repository, so the wire frame and the controls cannot drift.
- ChatStore/AppViewModel: answerPermission() settles the card in place
  optimistically and survives a chat switch; a failed reply reopens the
  same request rather than showing an unacknowledged decision.
- ChatPermissionFrame gains optional resolved/decision fields so a
  request the server reports as already settled shows its verdict with
  no stale actions; a new request replaces a settled card.
- Findability: a gold PanTool top-bar action and chat-chip marker jump
  to the pending card; the running indicator stands down while waiting.
- Tests: ChatApprovalTest covers pending/answered/resolved, the reply
  builder's once/reject decisions and the missing-summary fallback;
  ChatProtocolTest covers the server-resolution frame. README records
  the 265-test/assembleDebug evidence and the emulator-5556 captures,
  and .approval_check/chat_stub_approval.py is the test double used.

android/ only; no new dependency beyond material-icons-extended; no
Pipelines server, Go, installer or Docker file touched; no run started
from the app. The live brokered server is not verified (the resolved
frame fields are an additive contract it does not emit yet).
2026-10-16 16:12:22 +01:00
alan c700b28e6a Add cross-system read-only search
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.
2026-10-16 15:43:25 +01:00
alan 78d5bd38fc Route the stop control's interrupt through one tested builder
Extract the single chat_interrupt frame into ChatProtocol.interruptRequest and
have PipelinesRepository.chatInterrupt send it, so production and its unit test
share the one wire shape instead of the repository building it inline.

Add chatInterruptRequestCarriesTheRunningSession, which asserts the frame the
stop control sends is chat_interrupt carrying the running session's id (and no
chat prompt/reply) and that it survives the client's JSON round-trip.
Document the slice and its emulator-5556 evidence in android/README.md.
2026-10-16 15:31:04 +01:00