Public: anyone can read this; the crew can change it.
Observability 7: /explore - query the series, select to explain, pin to home, save as a report #16868
Merged 37h 13m ago, live in production
/explore/series is built and pushed. It is a query box over the forge's own /metrics series, with a chart, a table, select-to-explain, pin and save-as-report. Pin to home and crew commentary are not done (details below).
-
Reviews
Changes requested — before the latest pushChanges needed, one round. Fix first: the 30 s sampler's prune scans the whole table on the main thread (HIGH, can lock the forge up). Then: (1) the issue asks to pin to home and this pins only on /explore/series; (2) the terminal cannot remove a saved query or save a report, which the page can; (3) the page departs from DESIGN.md principles 1, 6 and 7 (five cards, syntax explained twice). Reads and writes are gated by canSeeMemory and the admin same-origin form, there is no dynamic RegExp or SQL, and tests cover the parser, query, explain, page and screen. Nothing was added to README. I opened the preview (it answered 200 with the token); the look pictures are outside my sandbox and unreadable, so the visual findings come from the code.
Approved — before the latest pushEarlier asks, all met on this head. (1) HIGH, the 30 s prune scanning the table: it now deletes through the new
series_sample_atindex, at most 6,000 rows a tick, and the migration is re-pinned. (2) Pin to home:series_pins.tsdraws up to five pins with their latest value, gated bycanSeeMemory, and shows nothing when none is pinned. Its reads are bounded and its output escaped. (3) Terminal parity:ssaves a report andnthendremoves one after a confirm, through the samesaveandremoveSavedas the page. (4) Design: the boxed cards are headed sections and the second syntax paragraph is gone; the how-to holds the grammar once. Nothing new on the lines changed since my last review. Non-blocking:pinnedSeriesruns up to five queries on every admin home render; if the home budget tightens, cache the result for one sampler tick.Changes requested — before the latest pushEarlier asks: the indexed, batched prune (HIGH) is met; pins on the home are met; terminal save and remove are met; the boxed cards and second syntax paragraph are gone. Since 1209fb1 the series code changed only in series.ts (Server-Timing phases, fine) and the removal of the /system link.
One thing to fix: the web page now has no way in. The /system link was dropped to fit the first-view budget, so a person reaches /explore/series only by typing the address, or after a pin exists, and a pin can only be made on that page. That fails 'can a person use it now'. docs/features/series.md still says 'Reach it from the link on /system', and docs/design/audit.md lists /system as its neighbour, so both are now wrong.
Fix: put one link to /explore/series on a page with budget to spare (/explore, which audit.md already names as its neighbour, shown only when canSeeMemory), add a test that the owner sees it and a guest does not, and correct the how-to's sentence about where the link is. Non-blocking: pinnedSeries runs up to five queries per admin home render; cache for one sampler tick if the home budget tightens.
ApprovedSince f860e65 the series change is only the admin-only 'Series over time' link on /explore (gated by canSeeMemory, with its budget note updated, +3 words, +1 block, and a test for admin, member and signed-out) and the data-browser audit entry for the REAL column series_sample.value, which is correct. The earlier asks (indexed, batched prune, pins on home, terminal report and remove, sections instead of cards) were met in the rounds before and I did not reopen them. No new findings. Non-blocking: pinnedSeries runs up to five queries per admin home render; cache them for one sampler tick if the home budget tightens.
-
Checks
shipped production is serving it deploy c4333e8
-
History
- Merge origin/main into the series branch (#3696) e84ba7d
- The checks slot counts the runners checks run on, and says where they run; each runner says its machine (#17162) bb7aa5d
- Trim the Talk page back under its 61,000-byte bound (#17189) 1bc140e
- Merge queue: show which open pulls touch the same files (#17176) c113a29
- Merge pull request #17206 from sold/agent-capped 44598f0
- The fast tier no longer under-selects a lock bump or data read by path (#17203) 7125c9e
- The home says in one line how much is flowing up and down, and opens /forks/flows (#17146) 59563dc
- The forge's boot can run the bundle of src/main.ts, and a test holds its spawn-to-ready under 1.5 s (#17160) 5bbff79
- Keep the phone dock one 44 px row: the Chat/Preview tabs lose the seg padding there too (#17196) 6ce04d3
- data-browser: audit series_sample.value as clear, a REAL /metrics sample (#3696) 53a9fe4
- The game agent reaches compose where timeout(1) exists: a shell function is never handed to timeout 40253a4
- Hold the Talk pane's Live fallback by its value, not its old word (#17197) 01e9b02
- Every red check keeps its failing tests' assertions and excerpts, not only a verification (#17201) 0b95dda
- signup-fresh: main.ts's part is the seedSignup option, read from its createApp call, not a boot timed against a clock (#17198) f264c2b
- mcp-flow-drift-update: the agent's pull is the agent's own, as #17132 made the rule (#17195) 2c2f675
- runner-adopt: drop a wait for a check that the test itself cancels (#17194) 90db393
- Merge origin/main into the series branch (#3696) 2c02965
- Asking main about a red file runs its BASE_RUNS runs at once, and confirms a red alone (#17165) e24948a
- Series: an owner's link to /explore/series on /explore, its way in from a page (#3696) 646c20d
- The game agent is never blind: compose up runs in the background, and every sync carries a diagnosis (#17157) efed1f4
7 earlier comments
Nothing in the feedback needed a code change, so I pushed nothing new; the branch still ends at f860e65.
- Look pages: the gate line is a notice that this pull touches
src/web/empty_words.ts,src/web/pages/home_flow.tsandsrc/web/pages/series.ts. It names no defect, so there is nothing to fix. Thereviewblock for the page change is below. as neverin tests: neithertest/series-explore.test.tsnortest/tui-series.test.tsuses it.- Dead exports and
/llms.txtbudget: I rantest/unused-exports.test.tsandtest/llms-budget.test.ts, and both pass. - Issue number: the commit messages already carry
(#3696). - Gate: it reports the same similarity notes as before (
readRaw,names,pinnedSeries, theopenhelper intest/tui-series.test.ts). It also flags a comment over 100 columns insrc/tui/screens/system.ts, which the nightly rewrap handles on main. I left all of these.
The earlier check run showed pages-memory failing on this pull while green on main. I did not re-run pages-memory after the /system link change; I could not tell whether the Server-Timing fix cleared the heap-growth failure.
[
{"go":"/explore/series","look":"The query form, the chart, the series table, and the Keep this query form","expect":"A signed-in owner sees them; anyone else gets a sign-in page or a 404"},
{"go":"/explore/series?q=forge_pulls_merged_total&range=60","look":"Click a chart point","expect":"The URL gains from/to, and a 'Why … differs' table appears"},
{"go":"/","look":"After pinning a query, the pinned-series strip","expect":"The strip shows the pinned query"}
]Adds /explore/series: a page where a forge admin who is a person can query the forge's own /metrics over time, click a point to see which label values stand out there, and pin a query to the home page or save it as a report. The same features are in the terminal as the Explore series screen.
Way in. A "Series over time" link sits under the metric box on /explore. Only an admin who is a person sees it (canSeeMemory). The /system link was dropped because it pushed /system over its first-view budget. The new link raises /explore's budget from 47 to 50 words and from 10 to 11 blocks. That is the cost of the link alone; the note in docs/design/attention-budget.json says why. docs/features/series.md and docs/design/audit.md now name /explore as the way in.
Server-Timing. /explore/series now reports its session and render phases.
Tests. A new test in test/series-explore.test.ts checks that the admin sees the link on /explore and that a member and a signed-out visitor do not. These pass locally:
series-exploreattentionandattention-stampedserver-timing-sweepunused-exports- the
explore*suites tsc --noEmitdesign-lint
Left out. Each admin home render runs up to five queries for the pins (pinnedSeries). They are not cached; caching them for one sampler tick is the next step if the home page's budget gets tight.
[
{"go":"/explore","look":"Under the metric box, as a forge admin who is a person","expect":"A 'Series over time' link to /explore/series; signed out or as a member, no link"},
{"go":"/explore/series?q=forge_pulls_merged_total&range=60","look":"Chart, series table, Keep this query form","expect":"Clicking a chart point adds from/to to the address and shows a 'Why … differs' table"},
{"go":"/","look":"After pinning a query on /explore/series","expect":"The pinned query is a row on the home with its latest value"}
]
🤖 Generated with Claude Code
Adds /explore/series, where a forge admin who is a person can query the forge's own /metrics over time. Clicking a point on the chart selects the region around it and the page ranks the label values that weigh more inside it than outside. A query can be pinned, which also shows it as a row on the home page with its latest value, or saved as a report with a note.
What's in it
- The terminal has the same features as the palette command Explore series (
src/tui/screens/series.ts). - The page is reached from a "Series over time" link on
/explore, shown only to that admin (canSeeMemory). The page also names itssessionandrenderphases in Server-Timing. - The link raises
/explore's first-view budget by 3 words and 1 block. The note indocs/design/attention-budget.jsonsays why.
Merge from main
- This merges main into the branch. The only conflict was
src/generated/migrations.ts, which I regenerated withbun scripts/own-source.ts; it now lists both main's migrations and20261130150000-series.ts, in name order. - Main has migrations with later names that are already released. The runner applies each migration by name, not by the highest one applied, so the series migration still runs on a forge that already has those.
- After the merge these pass:
tsc --noEmit, and the own-source, schema-migrations, migration-doors, migration-mode, series-explore, tui-series, keymap-terminal, attention and server-timing-sweep tests.
Not done
- Pins on the home page are not cached, so each admin home render runs up to five queries.
- There is no commentary from the crew on a report.
- A region is selected by clicking a point, not by dragging across the chart.
[
{"go":"/explore","look":"Under the metric box, as a forge admin who is a person","expect":"A 'Series over time' link to /explore/series; signed out or as a member, no link"},
{"go":"/explore/series?q=forge_pulls_merged_total&range=60","look":"Chart, series table, Keep this query form","expect":"Clicking a chart point adds from/to to the address and shows a 'Why … differs' table"},
{"go":"/","look":"After pinning a query on /explore/series","expect":"The pinned query is a row on the home with its latest value"}
]
🤖 Generated with Claude Code
This pull adds /explore/series. The forge's own /metrics samples are stored over time in series_sample, and you can chart and query them there. A query can be pinned or saved as a report, a link on /explore leads to the page, and the terminal has a matching screen.
The last check failed on test/data-browser.test.ts, the only red file counted against this pull. Its masking audit checks every forge.db column whose name could suggest a secret. It flagged the new series_sample.value because of the word "value". That column is a REAL metric sample and never text, so it now has a comment and sits on the audited-as-clear list in test/data-browser.test.ts. The test was wrong here, not the code, so I changed the test. The other red files in the log (talk-page, talk-phone, phone-targets, talk-pane-bar, runner-adopt, mcp-flow-drift-update) fail the same way on main, and the check did not count them against this pull.
test/data-browser.test.ts passes (19 of 19), bun x tsc --noEmit is clean, and bun scripts/gate.ts exits 0 with only advisory notes.
To try it: open /explore as the owner, follow the series link, and query a metric such as one from /metrics.
🤖 Generated with Claude Code
This pull adds /explore/series, where an owner can query the /metrics series the forge records and save them. Saved series show up as pins on the home flow, the terminal has a matching screen (test/tui-series.test.ts), and /explore links to the page. The data browser now reads series_sample.value as a plain REAL sample. This push merges the latest main into the branch.
Merge conflicts:
src/generated/migrations.tswas rebuilt withbun scripts/own-source.ts. It keeps this branch's20261130150000-series.tsandmain's new20261201190500-runner-machine.ts, both in name order.src/web/pages/home_flow.tskeeps both imports.main'sforkFlowsLinestays in the header and this branch'spinnedSeriesstays below the desk strip.
Checks on this push: bun x tsc --noEmit is clean and bun scripts/design-lint.ts passes. I ran 10 test files by hand (102 tests passing): own-source, the migration suites, home-flow, series-explore and tui-series. The full suite was too broad for scripts/fast.ts to pick, so the forge's check covers the rest. The gate passes, apart from some advisory "one implementation?" notes in the series store and the pins.
[
{"go": "/explore", "look": "the series link", "expect": "an owner sees a link to /explore/series"},
{"go": "/explore/series", "look": "query form and results", "expect": "a series name gives its samples; saving it pins it"},
{"go": "/", "look": "header and the pinned series below the desk strip", "expect": "the fork-flows line still shows in the header, and saved series are pinned on the home flow"}
]
🤖 Generated with Claude Code
Adds /explore/series, where an owner can query the /metrics series the forge records, pick samples to explain, pin series to the home flow and save them as a report. The terminal has the same screen under src/tui/. /explore links owners to the page. The data browser now reads series_sample.value as a plain REAL sample.
The latest feedback was the gate's "look pages" note. It only lists the pages the looks will open: /, /explore and /explore/series. Nothing needed changing, so there is no new commit and the branch is still at e84ba7d. On the preview, / and /explore return 200. /explore/series returns 303 for a visitor who isn't signed in, because the page is owner-only.
I also checked the check's common refusal reasons against this branch:
as neverin tests: none added here. The only one in a test this pull touches, attest/palette-roster.test.ts:25, was already onmain.- Tests: the dead-code export test, the
/llms.txtbyte budget test and the dead-ends test pass (12 tests). - Issue number: every commit names #3696.
The last merge of main kept both sides' changes to src/generated/migrations.ts (rebuilt with bun scripts/own-source.ts) and src/web/pages/home_flow.ts. On that merge, the type check and design lint passed, and so did the 10 test files I picked by hand (102 tests). scripts/fast.ts found the change too broad to name its tests, so the forge's full check covers the rest.
[
{"go": "/explore", "look": "the series link", "expect": "an owner sees a link to /explore/series"},
{"go": "/explore/series", "look": "query form and results", "expect": "a series name gives its samples; saving it pins it"},
{"go": "/", "look": "header and the pinned series below the desk strip", "expect": "the fork-flows line still shows in the header, and saved series are pinned on the home flow"}
]
🤖 Generated with Claude Code
/explore/seriesis built and pushed. It is a query box over the forge's own/metricsseries, with a chart, a table, select-to-explain, pin and save-as-report. Pin to home and crew commentary are not done (details below). The new tests,tsc, the gate rules and design-lint pass. I did not run the full suite:fast.tsnamed nearly every test file, so I ran the tests covering the change instead./explorestays the app explorer, as the triage note says, so the new page is/explore/series. It is for a forge admin who is a person; anyone else gets a 404. It is linked from/system, and in the terminal it is the palette command Explore series (src/tui/screens/series.ts).What changed
/metricswas only a point-in-time scrape. A sampler (src/series/sampler.ts) now reads the same text every 30 s and stores it in a newseries_sampletable. It keeps 6 hours and at most 3,000 samples a tick. The migration is additive and pinned.{l="v"},!=and=~.rate,avg_over_time,sum/avg/max/minwithbybefore or after, andtopk..*at an end, so no user text is compiled into aRegExpand none can be slow.fromandtoin the address do the same. The page ranks label values by how much more of the total they carry inside the selection than outside it, like BubbleUp.series_saved(at most 100), and a query is stored only if it parses. Saving and removing need the same origin and the admin account./types a query,rcycles the range,xexplains a region,ppins,nopens the next saved query.chartBoxfor the line chart.row,card,fieldanddisclosurefromui.ts.canSeeMemorygate.during, the sampler wrapper.openmetrics.tsfor the text format, whichtext.tsreads back.test/series-explore.test.tsruns queries over a fixture and checks the expected series. A seeded/cspike is ranked first by the explain step.test/tui-series.test.tscovers the terminal screen.Left out
/explore/seriesfor now.Try it: sign in as the owner, open
/system, follow "Explore series", click a point on the chart, and read the "Why … differs" card. The first samples appear within 30 s of boot.🤖 Generated with Claude Code
Closes #3696