0.65.0
This release makes the merge train a worker of its own, changes the Raven Keep view’s words, and adds the tree block with pi-better-show 0.4.0. It needs pi-anchorloop 2.11.0 or newer.
Trains as their own workers (todo #125)
Section titled “Trains as their own workers (todo #125)”A train is a session with the role train, opened by the tower from the integrator’s manifest, in a tab of its own (train 1106m). The integrator now only receives cars and schedules trains. Acceptance (e2e, UAT) moves to the coordinator, before the slip: there is no uat stage any more. How it works and what a project must change: Merge train and Moving a project to 0.65.0; the design record is the spec.
- Migration, in short. Remove
uatfromintegration.stages; addintegration.acceptand, if 3 is not right,maxTrains; rename the project skill’s## UATto## Acceptance; senddeparts:andaccept:on slips. - Commands.
cli.mjs train gate|check|status|clear|notices.
Prompts for the train as a worker of its own (todo #125 task 8; spec §13.1, §25)
Section titled “Prompts for the train as a worker of its own (todo #125 task 8; spec §13.1, §25)”-
prompts/train.mdis the train’s system prompt: one train, its steps as todos withmetadata.sb, commands only throughMonitorCreate, rounds on re-assembly, deploy targets in its own order read back by machine, rollback or report then end, no waiting on a person, each car’s fate set withtrain_car. It ends with its own seven-line## Seam bindingsblock, the Step runner among them. It needs pi-anchorloop 2.11.0 or newer. -
prompts/integrator.mdis the scheduler: receipt withtrain check --accept, thestrict-target check, a car that asks for acceptance returned with sb’s word, placement bydepartsandmaxTrains, thetrain:manifest throughcall_towerwhy: shared; no supervision, no UAT page, no notice sent by itself. -
main.md,planning.md,apps-config.mdbind the six seams to the new roles, send a coordinator’s acceptance (integration.accept, the boss’s nod quoted inaccept) before the slip, and drop theuatstage;tower.md,tower-run.mdforward a slip to the integrator withtower_replyandforward: <event id>, open a train withrole: "train"and the manifest, once per code and outside the two mains, and route theblockedabout a car notice. -
Review fixes. The slip is forwarded with
tower_reply(nottower_send);train.mdsays how steps declareholds,loadandlock; the Record lines point to the train’s own ledger file; the integrator’straintodo lifecycle, legacy trains, andblockedthen end are stated.
Trains in the net (task 5)
Section titled “Trains in the net (task 5)”- The sb server reads the trains of
<state>/trainboard/into the GUI’s snapshot (yards) with the 1-minute load and the core count (load; none on Windows). Both stay on this computer and are off with the merge train off. - A monitor that prints
{"progress":{"message","load"}}shows its message and keeps its load. cli.mjs train notices [--project P] [--pending] [--json]lists every car’s states, who set each, the line sent, the attempts, and when it was delivered or escalated.train noticessays its source is the journal on disk, lists the car and notice files that failed to read (unreadable), reads the newest 256 files of a project and tells when it cut. A car whose notice file is out of shape showsunreadablein the yard and intrain notices; one bad file no longer blanks every project’s yard or crashes the command.- The yard reads only the car files of the cars on the boards (not the first 256 of the folder), with a 4 MiB budget per reading, and
net.loadis a whole number. - The server deletes expired trainboards (an ended train after 7 days, a stale one after
train clearand 7 days) with the car files of its cars, at start and every hour, with the merge train on. train check --accept nonechecks a slip that saysaccept: noneagainst the app’sintegration.acceptinstead of failing to read a file callednone.- Role prompts can quote
{{cli}}, the command that runscli.mjs.
The whole-batch review (todo #125; spec §28)
Section titled “The whole-batch review (todo #125; spec §28)”- Required acceptance is read from
apps.jsonby the code. The integrator’s guard and the train’s manifest check refuse a car whose evidence lacks a kind its app’sintegration.acceptrequires, andaccept: nonefor an app that requires some;train checkreads the same file (--app NAME), and--app-acceptcan only add to it. A file or an app that cannot be read refuses. - An app that still lists
uatinstagesdeparts nothing. The tower opens no train for it, the integrator’straintodo andtrain checkrefuse it, naming the field and the migration. - The yard’s acceptance chip is what the code checked. The kinds of an evidence file that passed, 「免驗收」 only for an app that requires none, and 「驗收不明」 when the evidence cannot be checked; a word a model wrote on a car is refused and never shown.
- The cars a round removed stay on the yard with whether their coordinators were told, and their car files go with the board. The yard tells notices from the server’s own record, and from the file journal (marked 「取自檔案紀錄」) only for a car the server has not seen since it started.
- pi-anchorloop 2.11.0 is checked by the extension. A train’s and the integrator’s
todoandMonitorCreatecalls are refused while the installed package is older, unreadable, or missing. Update pi-anchorloop before the first train. - Prompts and docs.
droppednamesround, the integrator knows the code’s form, the todo order and absolute paths, a car queued before 0.65.0 is sent again (migration step 5), and the Merge train section of how-it-works matches the code.
The yard in the page (todo #125 task 7; spec §11.2, §26)
Section titled “The yard in the page (todo #125 task 7; spec §11.2, §26)”- The yard (調車場), a sheet per project, opens from a chip on a base’s header (「火車 3(等待 2)」), from an integrator’s card (a 調車場 button), and, for a project no unit of the net places, from a chip in the page header. It shows the counts (「3 列火車:1 運行、2 等待(互相等待 1)」, then the stalled, forming, departing, refused and unreadable ones, 「負載 42/14 核」), the forming trains with each car’s acceptance chip (it opens the boss’s words) and departure condition, and a row per train: short code (a link to its comms), app, tickets, round text (「第 2 次組裝:移除 T-12(unit 紅)」), step pills by kind coloured by state and outcome with a glyph beside the colour, the wait in words (§7.3), the load it needs, and each car’s notice line (told, telling with its try and the broker’s last answer, reported up, or unreadable). A reason a file could not be read for is a sentence in the page’s language (the server sends its kind beside the text;
reasonKind,problemKind). Ended trains fold away. Every word of a yard is a model’s text and stays text: no markup, link or route is made from it. - A train’s unit card uses the locomotive (game-icons.net Steam Locomotive, Delapouite, CC BY 3.0;
gui/ICONS.md), says 火車, and its note line is the step in progress and what it waits for (up to three lines, the whole line in its tooltip); a train that waits for a load or a lock is amber with a half-moon badge, not the idle grey. Raven Keep shows the same locomotive (no twin yet). - Zen’s strip adds 「火車 N(等待 M)」: two numbers, nothing else of the trains (D9).
- The board carries the removed cars (
removed: ticket and why, from the current round’sassemblestep), so the round text can name them; a board without it reads as before. - Demo:
?trains=<state>(all,forming,running,waiting,mutual,round2,notices,stale,ended,unreadable,empty,loose),&yardopens the yard. - The map’s chips and notes come from a chunk of their own (
trains.ts), fetched with the first snapshot that carries yards; the sheet is another (yard.ts).
Raven Keep words
Section titled “Raven Keep words”In Traditional Chinese the keep says 管家 for a tower, 鴉閣 for the head tower, 血僕 for a main, 眷屬 for agents, 通信 for the comms, and 自主活動 for a base with no tower; no Raven message says 智慧體. The sentences come from a pack that loads with the theme (gui/sentences.ts). The keep also draws its rooms by role behind a unit’s chat, a backdrop and perched raven on the map, and its own sounds (a bell asks, a caw finishes, a door creaks on failure).
The tree block and pi-better-show 0.4.0
Section titled “The tree block and pi-better-show 0.4.0”treeblocks are drawn. An agent’s directory snapshot (a fence```tree: two spaces per level,name/for a folder,{new|changed|removed|focus|risk}tags,# note,… N more) shows aspbs-treein the comms log and in a Markdown document card, in every view and at a phone’s width: folders open and close (click, arrows, Enter, Space, Home, End), tags are badges in the view’s own colours, deeper folders start closed unless a tagged file is below them, and the bar has Expand all and Collapse all. Its names and notes are text: no file or note is a link, and a note’s[text](https://github.com/wayne930242/pi-straw-boss/blob/main/docs/releases/url)shows as its text. A tree takes no answer. Rows and buttons are 44 px on touch.- The dependency is
pi-better-show0.4.0 (was 0.1.2). Contract changes that touch sb:treejoinsBLOCK_KINDSandTAGS;INTERACTIVE_KINDSandDISPLAY_KINDSare exported (sb’s list of answerable kinds is now the package’s); block segments carryraw. Unchanged: thebetter-show:*bus contract (v2),parse,encodeAnswer,inlinePlain,configure,Answer, the other elements. One thing changes for old messages: a```treefence was a plain code block and is now a tree block (or dashed invalid source when it holdstreecommand output), and a valid tree takes a block index, so the blocks after it in the same message move up by one; a block answered before the upgrade behind such a fence can show open again. A display block no longer carries the “could not be read” note when the record of answered blocks is unreadable. - Two lists learned
tree: the hint that loads the block code (a message whose only block is a tree is drawn as one) and the server’s count of a document’s blocks (the answer to the block after a tree is no longer refused as not there). Both are now held to the package’sBLOCK_KINDSby a test. - The block chunk grows by about 7.9 KB (2.2 KB gzipped); the eager page stays within its caps. NOTICE.md names 0.4.0.