Skip to content

Bridge core: fix cancel races, make the agent step optional, add a light theme - #63

Merged
KodeStar merged 16 commits into
mainfrom
fix/bridge-core-v270
Nov 10, 2026
Merged

KodeStar merged 16 commits into
mainfrom
fix/bridge-core-v270

Conversation

@KodeStar

Copy link
Copy Markdown
Owner

Fixes the open Bridge core P1 items for v2.7.0: cancel and give-way races, an optional agent setup step, a light theme, reusing a cancelled run's transcript, and Jobs tab wording.

Changes:

Deferred (in the issues): podcast and lane edges (#13), the engine book's path at a move (#24), the adopt-rule and progress items (#34), BRIDGE-04's cancel reason (needs a server change), and two rare races in readmit/supersede ordering and startup dropLost.

Verification:

  • Gate: go build, vet, test -race, golangci-lint; web typecheck, lint, format, test (198).
  • Review: /simplify, then two /code-review xhigh passes, then one high pass on the BRIDGE-09 change.
  • Live (scratch server + this Bridge with its real page, Playwright, 1440 and 390 px, light and dark): every tab and the login, the setup card, Jobs badges, the parked notice and Details; /favicon.svg 200 with no console errors or 4xx; setup complete with no agent on both the Bridge page and the console; detect, cancel, detect again logs "taking up the book's stopped chapters run, its transcription kept" and does not re-cut the windows. Not verified live: skipping already-transcribed windows (needs a real ASR worker).

Docs follow in one audiosilo-docs PR for this week's Bridge and server rows.

Closes #36. Part of #13, #24, #31, #34, #35, #37.

A readmit clears a book's status only while the row still carries the
status and error it read, and the supervisor refuses a cancelled book, so a
supervisor tick racing a Cancel never readmits it. A dropped or stranded
job of another server is released before it is recorded lost, so a job
waiting for it starts only once its engine book is stopped.
The owner's call reverses FIRST-RUN F2: podcasts, read-along, chapters and
Audible need no agent, so a Bridge used only for them completes its setup.
The item still says what to do; the page's label says what the agent is
for. The console follows the heartbeat's required flag.
Migration 0013 adds a partial index matching the unfinished-book predicate
the dispatch pass and the supervisor tick read, with a test that their query
plans use it.
A supervisor escalation of a book already parked keeps the park's message
for people and logs its diagnosis; a park with no message takes the
supervisor's. classifyError reads a reply's status after returned,
responded with or answered, and a bracketed status after a failure, still
never a bare number.
A job end closes the generate handler's end signal, and the waits for a
chapters run to give way or an earlier job to end wake on it, their bounds
now time. The detected list's check stats the audio with fsutil.StatWithin,
bounded and one in flight per path, so a hung mount never stalls a poll.
BRIDGE-09, the owner's call: a chapters job whose book's chapters run was
cancelled or failed at asr or chapter_detecting goes on from what that run
kept, goal chapters, instead of clearing it and transcribing the whole book
again. A run it can't trust (the file replaced) is cleared as before.
The Jobs tab no longer prints the raw kind beside a known label (it stays
the label's tooltip). A parked job shows the park's hint, the words the
Bridge sends the server, with the engine's own message as a detail under it.
BRIDGE-17, the owner's call: the page follows the system's colour scheme,
the light palette taken from the server console's light theme, with a test
that every token and used state shade has its light value. The page and
the placeholder link an SVG favicon, so its request no longer 404s.
Rounds of two concurrent releases under -race always leave the book
stopped: the stop retried after each end is recorded is what does it.
The owner's BRIDGE-09 call is a detect re-run after a cancel: a chapters
run that failed for a reason of its own is cleared by the new job as
before, so asking again never fails the same way forever.
The live check measured small amber text on its soft fill at 4.26-4.47:1
and green at 4.40:1, under the 4.5:1 AA target (the Needs attention and
steps-left badges, the warning notice, Online, Mapped, Writable). The light
theme's amber-200/300 move from #a86206 to #965705 and green-200/300 and
success from #0d7f5a to #0b7553; the dark theme is unchanged.

Ratios now (WCAG 2.x):
- amber #965705 on #fdf1dc (badge fill) 5.13, on the notice's 60% fill
  over #ffffff 5.38 / over #f5f7fa 5.20, on #ffffff 5.73, #f5f7fa 5.34,
  #eef1f5 5.06
- green #0b7553 on #e1f5ec (badge fill) 5.02, on the notice's 60% fill
  over #ffffff 5.28 / over #f5f7fa 5.14, on #ffffff 5.70, #f5f7fa 5.31,
  #eef1f5 5.03

Part of #35.
@KodeStar
KodeStar merged commit 7690542 into main Nov 10, 2026
2 checks passed
KodeStar added a commit to KodeStar/audiosilo-docs that referenced this pull request Nov 10, 2026
…e core (#271)

Documents the v2.7.0 week 1 server and Bridge changes, following the
User Guide readability rules.

- Server (server#356, #357, #358):
  - The path cap's routes and order.
  - Sync v2: a finish marks its session.
- Audible sync: preorders left out, the length rule, stale refusals
ignored, `drm_free`, and `audible_sign_in` now sync-only.
  - Renditions: a timeout is remembered as a refusal.
- Scanner: the in-process probe with `--ffprobe ""`, slow shares leave a
book whole, CJK search, and Health's plain unreadable line.
- The retired launcher options, setup fields and admin enrichment route.
  - Household members signed out with the owner.
- Smaller changes: `library_grant` 409, the `/next` folder fallback, the
read-along `-gz` ETag, member name rules, OPML busy, unknown library
kinds.
  - Migrations 0071 and 0073.
- Bridge (bridge#63 and the Audible follow-ups PR):
- Re-assert a place on Audible once, migration 0014, and the 14-day
delivered-preorder cap.
- Overlong matches, twins and bare series titles; coded poll refusals
and `drm_free`.
- The optional agent step, the light theme, a detect after a cancel
keeping its transcript, the Jobs tab wording, and migration 0013.
- User Guide: the same changes in plain words (Health, install without
ffprobe, search, end of book, Audible, Add a Bridge, accounts, invites).
- Screenshots: `admin/health-issues.png`, `admin/bridge-setup.png` and
`admin/settings-bridge-paired.png`, recaptured with the agent step
optional.

Verification: `npm run build` (broken links and anchors fail it).
Review: /simplify and /code-review high, with every claim spot-checked
against the server and Bridge code. That check corrected the path-cap
route list and removed leftover launcher wording.

Merge after the Bridge's Audible follow-ups PR, which it also documents.

Pairs with KodeStar/audiosilo-server#356, #357, #358 and
KodeStar/audiosilo-bridge#63.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Owner decision pending: make the Agent credential setup step optional

1 participant