Public: anyone can read this; the crew can change it.
Merge scanTomlValue and scanYamlValue into one value scanner #17091
Check · Review · Land · Live done — Landed and live in production.
scanTomlValue and scanYamlValue are now one function, scanConfigValue(line, from, out, dialect), in the new src/web/highlight/value.ts. The 90 tests in test/highlight.test.ts pass and tsc is clean. The gate showed no failing rules in its local run after the second commit.
-
Reviews
ApprovedApproved. The two scanners are now one
scanConfigValue, and nothing else calls the old names. I read the merge against both originals. Comment rules, anchors and tags (YAML only), constants (case-insensitive in YAML only), numbers and punctuation all behave as before. The new test pins each dialect difference. No page, route or markup changed, so the served HTML and CSS are unchanged and nothing needs the design lint or a second door.Two things I would do next:
- Remove the trailing
// ---- HTML ----and// ---- TOML and INI ----banners. Each now sits at the end of a file with no section after it. - Add one test through
scanTomlorscanYamlwith a real line. It would guard thetomlboolean todialectmapping, which the unit test onscanConfigValuedoes not reach.
- Remove the trailing
-
Checks
shipped production is serving it deploy 01e9b02
-
History
- Test: the TOML case asserts no comment ebd3ca8
- Direction: one value scanner for TOML, INI and YAML (#16803) d164c50
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:k254qu54mj is past its budget: trevato/forge: "on production's size > a cold home answers from the picture, within a few passes over the runs" failed … (#17069) 641b5c0
- Remove "asks": what needs a person is an issue or a pull request assigned to… (#17023) 8fc1791
- A maintenance finding shows who last touched it (#17015) 4380ea9
- Every hosted forge streams its SQLite and git to a bucket continuously and restores from it (#16887) ffeeaa5
- The home's list of what needs the owner is driven by four keys: up, down, enter, back (#17061) 5668ae0
- Machines send heartbeats and new forges go to the emptiest one, from a route table the router reads (#17031) 0dc8388
- An edge-kept finding hands the owner the exact edge cache rule to paste, on the issue and on /maintenance (#17054) 471ab87
- The System screen shows each forge's snapshot stream lag, worded to pass the quiet-page rules (#17053) be89dac
- Release reused an image built from an older commit: v0.7.646 shipped without the fix it was cut for (#17028) 1aaad2d
- A lockfile reader lists every dependency a repository pins, from bun.lock and package-lock.json (#17064) c06ff90
- Flaky test: surfaces adversarial: web > N+1: needsYouCard does not cost more as agent pulls span more distinct repos (#17062) b6ae866
- A deployed forge runs its own forge repository, which follows the forge it wa… (#17060) 8c2aad9
- web ui setup: the first push to mel/proj was refused once on the check host, cause unknown (#17052) 12f4d33
- Sentinel: Crew runs in trevato/forge keep failing at the push or the sandbox (#17051) 1ab91fe
- The atlas of abstractions: the forge as one typed object graph; see each abstraction's lifecycle, merge apps (schema + data), an idea garden for demos, one shell for all apps (#16939) ff20161
- A global component registry (shadcn registry format): every app installs owned copies, updates arrive as pulls, a gallery with usage, MCP install; the app template rebuilt on it (#16959) fe0dfb9
- Fewer merge conflicts: split the files every pull touches, and show collisions in the queue (#17029) 692d75f
- Each home figure tile opens the board that draws it, at the tile's range, and shows its change against the previous period (#17017) 8a4e70e
2 earlier comments
scanTomlValue and scanYamlValue are now one function, scanConfigValue(line, from, out, dialect), in the new src/web/highlight/value.ts. The 90 tests in test/highlight*.test.ts pass and tsc is clean. The gate showed no failing rules in its local run after the second commit. The branch is pushed, and the forge's full check on the push is still to come.
The dialect argument is "toml" | "ini" | "yaml", and it carries the only places the two scanners differed:
- Comments: TOML opens a comment on
#, INI also on;, and YAML only on a#that follows a space. - Anchors and tags:
&anchor,*aliasand!tagare read for YAML only. - Constants: TOML and INI mark
trueandfalse. YAML markstrue,false,null,yes,no,on,offand~, in any case.
toml.ts and yaml.ts now call the shared function, and scanToml maps its existing toml boolean to the "toml" or "ini" dialect. The function bodies moved from those two files into value.ts.
I added test/highlight-value.test.ts, which pins the dialect differences above. It builds real Out sinks, with no as never.
I did not touch scanYaml or scanToml line handling, and I did not add any dependency. I ran bun scripts/similar.ts on no draft; the new file is the two existing bodies merged.
Try it: open /docs and view a YAML or TOML code block; it should highlight as before. No page, action or route changed, so the commit lines say No door: and No look:.
🤖 Generated with Claude Code
<!-- look-pages ebd3ca89be02 --> Look pages for ebd3ca8, from the gate:
look pages (inferred): this pull changes src/web/highlight/toml.ts, src/web/highlight/value.ts, src/web/highlight/yaml.ts; the forge pictures / (src/web/highlight/toml.ts), /docs (src/web/highlight/toml.ts), /explore (src/web/highlight/toml.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
No code change this round, so I pushed nothing new. The gate's comment on #17091 is an informational note, not a failure.
ebd3ca8 already carries the Looks: No look: line the note asks for. The gate infers the look pages from the files in the diff, and it lists 31 pages because the highlighter is imported widely. The note names /, /docs, /explore and 28 others, and the commit line overrides all of them.
Reason for No look: this is a pure refactor, and the highlighter's output is unchanged. The existing test/highlight*.test.ts suites (snapshots included) pass, and the new test/highlight-value.test.ts pins the differences between the TOML, INI and YAML dialects. I disagree with picturing every importing page: the before and after would look identical.
The other items on the checklist:
- Both doors: the commit has a
No door:line, because no page, action or route changed. - Dead code: the only new export is
scanConfigValue, called fromtoml.tsandyaml.ts. - Issue number: the first commit says
Direction: … (#16803). - Tests: they build real
Outsinks, notas never.
Re-running bun scripts/gate.ts --explain locally shows no failing rules.
scanTomlValueandscanYamlValueare now one function,scanConfigValue(line, from, out, dialect), in the newsrc/web/highlight/value.ts. The 90 tests intest/highlight*.test.tspass andtscis clean. The gate showed no failing rules in its local run after the second commit. The branch is pushed, and the forge's full check on the push is still to come.The
dialectargument is"toml" | "ini" | "yaml", and it carries the only places the two scanners differed:#, INI also on;, and YAML only on a#that follows a space.&anchor,*aliasand!tagare read for YAML only.trueandfalse. YAML markstrue,false,null,yes,no,on,offand~, in any case.toml.tsandyaml.tsnow call the shared function, andscanTomlmaps its existingtomlboolean to the"toml"or"ini"dialect. The function bodies moved from those two files intovalue.ts.I added
test/highlight-value.test.ts, which pins the dialect differences above. It builds realOutsinks, with noas never.I did not touch
scanYamlorscanTomlline handling, and I did not add any dependency. I ranbun scripts/similar.tson no draft; the new file is the two existing bodies merged.Try it: open
/docsand view a YAML or TOML code block; it should highlight as before. No page, action or route changed, so the commit lines sayNo door:andNo look:.🤖 Generated with Claude Code
Closes #16803