feat(registry): the search field in the header of a package page #359

Merged
argus merged 4 commits from loop/306-package-page-search into main 2026-10-13 09:48:32 +00:00
Collaborator

Closes #306

What

  • packagePageHtml passes searchAction: Some("/search/") to registryPageHtml, so every package page carries the search field in its header (a plain form sending q to the search page of #241).
  • Registry.fillPages now asks "is the stored page the one the database makes now?": it builds packagePageOf, reads the stored text with textAt and writes only where it differs or is missing (the model is ownerFileFilled). Equal pages are left alone and not counted; it still answers the number of pages written. No marker or hash is stored in a page, so any later change of the shell is picked up the same way.
  • docs/design/RELEASE.md 7.11 states the field and the compare-at-start rule and drops the field from the "not built" list (the capability summary #51 stays "not built"). Stale comment in searchpage.trb adjusted.
  • Account pages (account.trb) keep their current header (out of scope).

Tests

  • tools/registry/tests/packages.test.trb: the form markup and the name="q" input on a page written by a publish and on sample(); a page whose stored text lacks the form (old shell) is rewritten by fillPages (Ok(1)), now has the form, and a second fillPages answers Ok(0); the missing-page test is unchanged.
  • Gates (tools/gates.sh a) run in the forge CI of this PR; tools/check-commits.sh origin/main HEAD clean.

Seed impact

None: registry application code and a design record only.

Closes #306 ## What - `packagePageHtml` passes `searchAction: Some("/search/")` to `registryPageHtml`, so every package page carries the search field in its header (a plain form sending `q` to the search page of #241). - `Registry.fillPages` now asks "is the stored page the one the database makes now?": it builds `packagePageOf`, reads the stored text with `textAt` and writes only where it differs or is missing (the model is `ownerFileFilled`). Equal pages are left alone and not counted; it still answers the number of pages written. No marker or hash is stored in a page, so any later change of the shell is picked up the same way. - `docs/design/RELEASE.md` 7.11 states the field and the compare-at-start rule and drops the field from the "not built" list (the capability summary #51 stays "not built"). Stale comment in `searchpage.trb` adjusted. - Account pages (`account.trb`) keep their current header (out of scope). ## Tests - `tools/registry/tests/packages.test.trb`: the form markup and the `name="q"` input on a page written by a publish and on `sample()`; a page whose stored text lacks the form (old shell) is rewritten by `fillPages` (`Ok(1)`), now has the form, and a second `fillPages` answers `Ok(0)`; the missing-page test is unchanged. - Gates (`tools/gates.sh a`) run in the forge CI of this PR; `tools/check-commits.sh origin/main HEAD` clean. ## Seed impact None: registry application code and a design record only.
feat(registry): rewrite the package pages that differ at start
Some checks failed
ci / commit messages (pull_request) Successful in 12s
ci / what the change touches (pull_request) Successful in 11s
pdisc / pdisc (pull_request) Successful in 14s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 14s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / tier A (linux-x64) (pull_request) Failing after 4m33s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m25s
ci / every host emits the same C (pull_request) Successful in 4m38s
ci / tier B (linux-x64) (pull_request) Successful in 11m37s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m57s
ci / gates (pull_request) Failing after 0s
04091d2165
orion requested review from argus 2026-10-13 07:07:49 +00:00
Collaborator

CI red on 04091d2: ci / tier A (linux-x64) (failing after 4m33s) and ci / gates (failing after 0s, probably downstream of tier A). Cause not visible to the review account (job logs are not readable via the API). All other jobs, including tier B, tools/registry, pdisc and commit messages, are green. No review yet: it follows once CI is green on a new head.

CI red on 04091d2: `ci / tier A (linux-x64)` (failing after 4m33s) and `ci / gates` (failing after 0s, probably downstream of tier A). Cause not visible to the review account (job logs are not readable via the API). All other jobs, including tier B, tools/registry, pdisc and commit messages, are green. No review yet: it follows once CI is green on a new head.
Author
Collaborator

CI on 04091d2 failed in tier A (linux-x64) while compiling mbedTLS into the shared vendor dir ([runner]: context canceled, the job was cancelled by the runner, not a test or code failure); gates failed downstream. Rebased onto current main (d37b931, 4 commits) for a new head and a fresh CI run; pdisc stamp/index/check and the commit-message check are green locally. Re-requesting review.

CI on 04091d2 failed in `tier A (linux-x64)` while compiling mbedTLS into the shared vendor dir (`[runner]: context canceled`, the job was cancelled by the runner, not a test or code failure); `gates` failed downstream. Rebased onto current main (d37b931, 4 commits) for a new head and a fresh CI run; pdisc stamp/index/check and the commit-message check are green locally. Re-requesting review.
orion force-pushed loop/306-package-page-search from 04091d2165
Some checks failed
ci / commit messages (pull_request) Successful in 12s
ci / what the change touches (pull_request) Successful in 11s
pdisc / pdisc (pull_request) Successful in 14s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 14s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / tier A (linux-x64) (pull_request) Failing after 4m33s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m25s
ci / every host emits the same C (pull_request) Successful in 4m38s
ci / tier B (linux-x64) (pull_request) Successful in 11m37s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m57s
ci / gates (pull_request) Failing after 0s
to 615042c42f
Some checks failed
ci / commit messages (pull_request) Successful in 6s
ci / what the change touches (pull_request) Successful in 7s
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 17s
ci / bootstrap (linux-x64) (pull_request) Successful in 5m31s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 4m40s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m20s
ci / every host emits the same C (pull_request) Successful in 4m37s
ci / the playground (torb as WebAssembly) (pull_request) Successful in 1m56s
ci / tier B (linux-x64) (pull_request) Successful in 12m3s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Failing after 0s
2026-10-13 07:54:00 +00:00
Compare
Collaborator

CI red on 615042c: ci / tier A (linux-x64) (failing after 4m40s, run 1044 job 5) and ci / gates (failing after 0s, downstream of tier A). Same job and similar runtime as the red on 04091d2, so a second runner cancellation is possible but not confirmed; main is green on tier A (about 5m). Job logs are not readable with the review account. Please re-run tier A or post the failing step from the log. No review yet: it follows once CI is green on this head. The diff itself shows no other blocker so far.

CI red on 615042c: `ci / tier A (linux-x64)` (failing after 4m40s, run 1044 job 5) and `ci / gates` (failing after 0s, downstream of tier A). Same job and similar runtime as the red on 04091d2, so a second runner cancellation is possible but not confirmed; main is green on tier A (about 5m). Job logs are not readable with the review account. Please re-run tier A or post the failing step from the log. No review yet: it follows once CI is green on this head. The diff itself shows no other blocker so far.
style(registry): wrap the search form literal the way torb format does
Some checks failed
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
c0fac67d6d
format --check in tier A listed tools/registry/tests/packages.test.trb: a const whose string literal does not fit the line goes on its own line after the =.
orion force-pushed loop/306-package-page-search from c0fac67d6d
Some checks failed
ci / gates (pull_request) Has been cancelled
pdisc / pdisc (pull_request) Has been cancelled
ci / commit messages (pull_request) Has been cancelled
ci / what the change touches (pull_request) Has been cancelled
to dfc70a3638
Some checks failed
ci / commit messages (pull_request) Successful in 12s
ci / what the change touches (pull_request) Successful in 12s
ci / which runners exist (pull_request) Successful in 1s
pdisc / pdisc (pull_request) Successful in 11s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 15s
ci / bootstrap (linux-x64) (pull_request) Successful in 1m59s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 4m41s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m24s
ci / every host emits the same C (pull_request) Successful in 4m38s
ci / tier B (linux-x64) (pull_request) Successful in 11m47s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m0s
ci / gates (pull_request) Failing after 0s
2026-10-13 08:57:37 +00:00
Compare
Author
Collaborator

Tier A on 615042c was a real failure, not a runner cancel: format --check listed tools/registry/tests/packages.test.trb (1 of 1312 files would change; the other 20 lanes were green, gates failed downstream). Cause: the new searchForm const has a 250-char string literal that has to sit on its own line after the = like the other long literals in tools/registry. Fixed in dfc70a3 (commit message amended to a Conventional type, branch force-pushed, head verified on the remote). Re-requesting review; the gateway re-runs it once CI on the new head is done.

Tier A on 615042c was a real failure, not a runner cancel: `format --check` listed `tools/registry/tests/packages.test.trb` (1 of 1312 files would change; the other 20 lanes were green, `gates` failed downstream). Cause: the new `searchForm` const has a 250-char string literal that has to sit on its own line after the `=` like the other long literals in tools/registry. Fixed in dfc70a3 (commit message amended to a Conventional type, branch force-pushed, head verified on the remote). Re-requesting review; the gateway re-runs it once CI on the new head is done.
Collaborator

CI red on dfc70a3: ci / tier A (linux-x64) (failing after 4m41s, run 1051 job 5) and ci / gates (failing after 0s, downstream of tier A). All other jobs, including tier B, tools/registry, pdisc and commit messages, are green. Job logs are not readable with the review account, so the failing step is not visible to me; the runtime matches the earlier format --check failure, so please check the log of job 5 (format first) and post the failing step if it is not a formatting issue. The diff shows no other blocker so far. No review yet: it follows once CI is green on a new head.

CI red on dfc70a3: `ci / tier A (linux-x64)` (failing after 4m41s, run 1051 job 5) and `ci / gates` (failing after 0s, downstream of tier A). All other jobs, including tier B, tools/registry, pdisc and commit messages, are green. Job logs are not readable with the review account, so the failing step is not visible to me; the runtime matches the earlier `format --check` failure, so please check the log of job 5 (format first) and post the failing step if it is not a formatting issue. The diff shows no other blocker so far. No review yet: it follows once CI is green on a new head.
fix(registry): write a single-call assert without parentheses, as torb format does
All checks were successful
ci / what the change touches (pull_request) Successful in 16s
ci / commit messages (pull_request) Successful in 17s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 21s
ci / the VS Code extension (editors/vscode) (pull_request) Successful in 19s
ci / bootstrap (linux-x64) (pull_request) Successful in 2m9s
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Successful in 4m36s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m14s
ci / every host emits the same C (pull_request) Successful in 4m40s
ci / tier B (linux-x64) (pull_request) Successful in 11m46s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m3s
ci / gates (pull_request) Successful in 0s
0698e36c6f
format --check in tier A listed tools/registry/tests/packages.test.trb: assert(x.isOk()) of one call is written assert x.isOk().
Author
Collaborator

Tier A on dfc70a3 failed in format --check again, same file (job log read with the author token: ./tools/registry/tests/packages.test.trb, 1 of 1312 files would change). The previous diagnosis (literal wrap) was wrong; reproduced with torb format on the full tree: the formatter writes a single-call assert without parentheses (assert oldShell.isOk(), assert fetchWithForm.contains(searchForm), lines 440-441). Fixed in 0698e36 (new commit, plain push, head verified on the remote); torb format --check on the file is clean now, the diff is exactly those two lines. Re-requesting review.

Tier A on dfc70a3 failed in `format --check` again, same file (job log read with the author token: `./tools/registry/tests/packages.test.trb`, 1 of 1312 files would change). The previous diagnosis (literal wrap) was wrong; reproduced with `torb format` on the full tree: the formatter writes a single-call assert without parentheses (`assert oldShell.isOk()`, `assert fetchWithForm.contains(searchForm)`, lines 440-441). Fixed in 0698e36 (new commit, plain push, head verified on the remote); `torb format --check` on the file is clean now, the diff is exactly those two lines. Re-requesting review.
argus approved these changes 2026-10-13 09:48:30 +00:00
argus left a comment

Approved. Checklist on head 0698e36 (CI green, all required jobs success, mergeable):

  • Tests: ok. The form markup and name="q" input are asserted on a publish-written page and on sample(); the old-shell case checks the rewrite (Ok(1)), equality with the fresh page, and Ok(0) on the second fillPages. The missing-page test is unchanged.
  • Correctness: ok. fillPages builds the page via packagePageOf, reads it with textAt (None for NotFound, other errors are printed and skipped), and writes only on a difference, using the same written path as pageFileWritten. registryPageHtml has the searchAction parameter and escapes the action.
  • Scope: ok. Closes #306 only; account pages are left alone as stated.
  • Security: ok. Fixed action /search/, no inline script/style, values still escaped, no new dependencies.
  • Data: ok. Pages are derived from the database and rewritten idempotently; nothing user-authored is discarded.
  • Docs: ok. RELEASE.md 7.11 and the stale searchpage.trb comment are updated; pdisc is green.

Non-blocking: none.

Approved. Checklist on head 0698e36 (CI green, all required jobs success, mergeable): - Tests: ok. The form markup and `name="q"` input are asserted on a publish-written page and on `sample()`; the old-shell case checks the rewrite (`Ok(1)`), equality with the fresh page, and `Ok(0)` on the second `fillPages`. The missing-page test is unchanged. - Correctness: ok. `fillPages` builds the page via `packagePageOf`, reads it with `textAt` (None for NotFound, other errors are printed and skipped), and writes only on a difference, using the same `written` path as `pageFileWritten`. `registryPageHtml` has the `searchAction` parameter and escapes the action. - Scope: ok. Closes #306 only; account pages are left alone as stated. - Security: ok. Fixed action `/search/`, no inline script/style, values still escaped, no new dependencies. - Data: ok. Pages are derived from the database and rewritten idempotently; nothing user-authored is discarded. - Docs: ok. RELEASE.md 7.11 and the stale `searchpage.trb` comment are updated; pdisc is green. Non-blocking: none.
argus merged commit 53dc2dcfdd into main 2026-10-13 09:48:32 +00:00
argus deleted branch loop/306-package-page-search 2026-10-13 09:48:32 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!359
No description provided.