Public: anyone can read this; the crew can change it.
A Windows .reg file reads as a table of keys and values, with what it deletes called out #16786
Check · Review · Land · Live done — Landed and live in production.
A .reg file now opens on its blob page as one section per key with typed values, and the keys and values it deletes get their own list. I ran the new tests, the fuzz and kinds tests, test/mcp-read-file.test.ts, test/mcp-size.test.ts, tsc, the design lint and scripts/gate.ts --fix; all pass.
-
Reviews
Changes requested — before the latest pushThe parser, escaping, caps, MCP
aboutand terminal view read sound, and I found no security finding. Two things to fix in one round:- Fix first: the issue's box 5 asks for a
reviewblock with before/after screenshots. The block has two steps and no screenshots, and the pull says none were taken. Add them. Thegopaths point at/blob/main/..., but the example file exists only on this branch, so they should point at the branch or ref that has it. registryViewis wired intoworkspace.tstwice (see the comment). Keep one.
I opened the preview:
/answers 200 and shows the signed-out landing page. The preview holds no repository, so the example file has no blob page there, and the .reg view cannot be tried in it. I judged the view from the diff and its tests.ApprovedSince ffa1c70: the duplicate registryView call on the playlist line is gone and it is wired once, in the book chain. That was my earlier ask and it is met. Nothing else changed. Non-blocking: the review block has no before/after screenshots. The builder's sandbox cannot take them, so they are left to a person.
- Fix first: the issue's box 5 asks for a
-
Checks
shipped production is serving it deploy 0496446
-
History
- One path for the registry view in the terminal workspace: the book chain 6cb77f6
- The guide names the registry kind by its .reg extension, as the code lists it ffa1c70
- Try: open docs/examples/settings.reg in the file view 7626793
- A Windows .reg file reads as keys with typed values, and what it deletes listed apart (#16027) 0087be8
- small: Escape leaves the tell box and keeps its draft per page (#16774) 24468de
- On a phone, one tap opens search with the keyboard up and results above it (#16749) 7238053
- A room on an app's change stream reports who is present (#16776) 98bb47d
- Port Jay Moran's demo: actions/demo, refs/demo and moveRefLeased's caller, demo routes (#16745) b346c0a
- The plans page says what each forge size is for, measured by the time to a first built change (#16759) a1bc223
- The owner grants one of his apps, or one crew member, read access to a read-only work repo (#16750) 1d1b0ae
- A card for every #12: the forge's one peek, on every page (#16700) 68934bd
- The system MCP tool answers `kind: "pages"` with the same page-budget rows /system shows (#16755) df6de28
- Talk on a phone, still wrong after #16552 landed: conversation history loads… (#16768) f2ced5a
- An issue whose body opens "Follow-up to #N" waits for #N on the map, and the page and the terminal say so (#16762) e002bf0
- Next up's pace line wins only when the cost line is unknown: a test shows both (#16763) 8e10c2c
- A pull reading says approval moved in one string: approvedAt reads "head against base" beside the object it carries now (#16761) f788d21
- Every /next decision kind has a test that fails without its 60-second Undo, and the MCP names the same undo (#16758) e78d344
- A 5,000-row deploy_pull prune batch holds the write lock under 50 ms, measured in a test (#16756) b9a4941
- The vendor's own variables (ANTHROPIC_*, CLAUDE_CODE_*) are read only inside the Claude runner's module (#16757) 46e0349
- Revert "LFS door: batch API and locks on the BlobStore" (#16754) 771a2a7
7 earlier comments
A .reg file now opens on its blob page as one section per key with typed values, and the keys and values it deletes get their own list. I ran the new tests, the fuzz and kinds tests, test/mcp-read-file.test.ts, test/mcp-size.test.ts, tsc, the design lint and scripts/gate.ts --fix; all pass. I did not run the full suite, which the forge runs on push. I took no screenshots and did not open the page in the running app.
What changed
- Detection: a new kind,
registry, insrc/web/render/kinds.ts, with a 1 MB render cap. A.regfile counts only if its first line isWindows Registry Editor Version 5.00orREGEDIT4. UTF-16 files have NULs in the head, so the check runs before the binary test. Any other.regstays plain text. - Renderer:
src/web/render/reg.ts, registered inrenderers.ts. A value shows as string, dword, qword, binary, expandable string or multi-string. Binary values show only their length and first 32 bytes. - Deletions:
[-KEY]and"name"=-appear under "Deleted by this file", in two tables, one for keys and one for values. - Bounds: at most 500 keys, 200 values per key and 500 deletions per list, with a note on how many were left out. Everything is escaped. A file that fails to parse or names no keys keeps its source, with the reason in one line.
- Terminal and MCP: the terminal workspace opens the same file as a table (
workspace_registry.ts). The MCPread_filetool returnsabout: {kind: "registry", keys, values, deletedKeys, deletedValues}, so there is no new tool and the ceilings are untouched. - Docs and tests:
- Docs:
docs/features/registry.md, a row infile-kinds.md, anddocs/examples/settings.reg. - Tests: a new
test/render-registry.test.ts, a sample intest/fuzz-renderers.test.ts, plus entries intest/render-kinds.test.tsandtest/mcp-read-file.test.ts.
- Docs:
Left out
- It is read-only, with no editing and no merge view.
- UTF-16BE is decoded, but only UTF-16LE is the Windows norm.
- Nothing links to the registry, and Windows environment variables are not expanded.
- For a UTF-16 file,
read_filereturns the base64 body plusabout, not the decoded text.
Reused: the m3u renderer's shape (kind, cap, fallback, the terminal and MCP hooks) and fileSize, escapeHtml and html. scripts/similar.ts found no closer match.
Check: scripts/gate.ts refused the first push until a commit line carried a "Try:" line, so there is an empty commit for that.
[
{"go": "/trevato/forge/blob/main/docs/examples/settings.reg", "look": "One section per key; values table with Name, Type, Data", "expect": "A string, a dword (0x00000001 (1)), a binary (6 bytes: de ad be ef 00 01) and an expandable string (%PATH%)"},
{"go": "/trevato/forge/blob/main/docs/examples/settings.reg", "look": "The 'Deleted by this file' section below the keys", "expect": "Legacy key listed under Keys; 'Old setting' under Values with its key"}
]<!-- look-pages 762679399402 --> Look pages for 7626793, from the gate:
look pages (inferred): this pull changes src/web/render/kinds.ts, src/web/render/reg.ts, src/web/render/renderers.ts; the forge pictures / (src/web/render/kinds.ts), /docs (src/web/render/kinds.ts), /explore (src/web/render/kinds.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
A .reg file now shows as a table of keys with typed values, and what it deletes is listed apart. I pushed a fix for the two file-kind guide failures; the other four check failures I did not fix.
What changed
scripts/kinds-guide.tsnamed the new kind "Registry export (.reg)", butsrc/web/render/kinds.tsnever listedregas one of its extensions. The guide table came out with an empty extension list, so it no longer matcheddocs/features/file-kinds.md.- I registered
reginSNIFFED_EXTENSIONSinkinds.tsand shortened the name to "Registry export". - The guide doc already held the right row, so it didn't change.
test/kinds-guide.test.tspasses. It had two failures: the table check and the "stale table is repaired" check.
Not fixed
test/llms-budget.test.tsis red on main too, so the check doesn't count it against this pull. It still fails locally.- The three code-browser tests in
test/web-code.test.tspass here, both with my fix and without it. I couldn't reproduce them. My guess is a flake or a sharding effect, but I haven't confirmed that. bun x tsc --noEmitandbun scripts/gate.ts --fixcame back clean. The gate notes one over-long comment intest/mcp-read-file.test.tsthat the nightly rewrap handles.- I didn't run the full suite locally; the forge's check runs it on this push.
To try: open docs/examples/settings.reg in the file view.
<!-- look-pages ffa1c70adca4 --> Look pages for ffa1c70, from the gate:
look pages (inferred): this pull changes src/web/render/kinds.ts, src/web/render/reg.ts, src/web/render/renderers.ts; the forge pictures / (src/web/render/kinds.ts), /docs (src/web/render/kinds.ts), /explore (src/web/render/kinds.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
The feedback is the gate's automatic list of look pages for ffa1c70. It asks for no change, so I changed nothing and pushed nothing.
The gate inferred the pages by following which routes import src/web/render/kinds.ts, which is how it got /, /docs, /explore and 28 more. The change itself only affects how a .reg file reads in the file view. The gate says a Looks: <path> or No look: <why> line in a commit message would override the inferred list. I haven't added one, because I'd have to amend a pushed commit or add an empty one. If you want the list narrowed to the file view, say so and I'll add the line.
Pull description
A Windows .reg file now reads as a table of keys with typed values, and what the file deletes is listed apart. The change adds a registry file kind with a renderer in src/web/render/reg.ts. It reads UTF-16 and ASCII exports and decides by the Windows Registry Editor Version 5.00 header line, not by the name alone. The terminal workspace and the MCP read_file tool get the same reading. There is a how-to in docs/features/registry.md.
The file-kind guide is regenerated, with reg listed as the kind's extension.
Left out: editing or merging a registry file, and files over 1 MB, which keep their source view.
To try it, open docs/examples/settings.reg in the file view.
I fixed the duplicate registryView wiring, but I couldn't take the screenshots, so the review block is still missing them. The registry, terminal workspace and format tests pass (66), and the type check is clean. I did not run the full set of tests the change touches: scripts/fast.ts named 3,789 files, so I ran only the four covering the registry renderer and terminal views.
What changed
- A Windows
.regfile now reads as a table of keys with typed values, and what it deletes is listed apart. The renderer issrc/web/render/reg.ts. It reads UTF-16 and ASCII exports and decides by theWindows Registry Editor Version 5.00header line, not by the name alone. - The terminal workspace and the MCP
read_filetool read it the same way. - The file-kind guide is regenerated with
regas the extension. A how-to is indocs/features/registry.md. registryViewis now wired intoworkspace.tsonce, in thebookchain. I removed the second call on the playlist line, which now readsplaylistView(...)alone.
What I left out
- Editing or merging a registry file.
- Files over 1 MB, which keep their source view.
- Before and after screenshots. The preview holds no repository, and my sandbox reaches only the forge and the app's own previews, so I had no way to take them. The
gopaths below point at the branch, where the example file lives, so a reviewer can capture them.
To try it: open docs/examples/settings.reg on this branch in the file view.
[
{"go": "/trevato/forge/blob/scout/16027-a-windows-reg-file-reads-as-a-table-of-k/docs/examples/settings.reg", "look": "The keys table. Each value shows its type, and the deleted keys and values sit in their own list apart.", "expect": "A table of keys with typed values, and a separate deletions list. No raw .reg source is shown first.", "ask": "Take the after screenshot here."},
{"go": "/trevato/forge/blob/main/docs/features/file-kinds.md", "look": "The kind table row for Registry export.", "expect": "`.reg` is listed beside Registry export, drawn up to 1 MB.", "ask": "Take the before screenshot of a .reg file's plain source view on main, for comparison."}
]<!-- look-pages 6cb77f6f8a79 --> Look pages for 6cb77f6, from the gate:
look pages (inferred): this pull changes src/web/render/kinds.ts, src/web/render/reg.ts, src/web/render/renderers.ts; the forge pictures / (src/web/render/kinds.ts), /docs (src/web/render/kinds.ts), /explore (src/web/render/kinds.ts) and 28 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Left #16027 open: 1 unticked item remain (The new test file is found by the gate list; bun scripts/design-lint.ts is clean; the pull carries a review block with before/after screenshots.).
A
.regfile now opens on its blob page as one section per key with typed values, and the keys and values it deletes get their own list. I ran the new tests, the fuzz and kinds tests,test/mcp-read-file.test.ts,test/mcp-size.test.ts,tsc, the design lint andscripts/gate.ts --fix; all pass. I did not run the full suite, which the forge runs on push. I took no screenshots and did not open the page in the running app.What changed
registry, insrc/web/render/kinds.ts, with a 1 MB render cap. A.regfile counts only if its first line isWindows Registry Editor Version 5.00orREGEDIT4. UTF-16 files have NULs in the head, so the check runs before the binary test. Any other.regstays plain text.src/web/render/reg.ts, registered inrenderers.ts. A value shows as string, dword, qword, binary, expandable string or multi-string. Binary values show only their length and first 32 bytes.[-KEY]and"name"=-appear under "Deleted by this file", in two tables, one for keys and one for values.workspace_registry.ts). The MCPread_filetool returnsabout: {kind: "registry", keys, values, deletedKeys, deletedValues}, so there is no new tool and the ceilings are untouched.docs/features/registry.md, a row infile-kinds.md, anddocs/examples/settings.reg.test/render-registry.test.ts, a sample intest/fuzz-renderers.test.ts, plus entries intest/render-kinds.test.tsandtest/mcp-read-file.test.ts.Left out
read_filereturns the base64 body plusabout, not the decoded text.Reused: the m3u renderer's shape (kind, cap, fallback, the terminal and MCP hooks) and
fileSize,escapeHtmlandhtml.scripts/similar.tsfound no closer match.Check:
scripts/gate.tsrefused the first push until a commit line carried a "Try:" line, so there is an empty commit for that.Closes #16027