installer 2.0.2: the highest version is read through Forgejo's last-page link (#149) #150

Manually merged
terra merged 5 commits from venus/149-installer-tag-pages into main 2026-11-24 22:16:52 +00:00
Member

Refs macula-io/martha#149 (gap 1 of the stranger run).

With no version named, the installer refused every install: lists more tags than one page; name a version. Forgejo's registry sends rel="next" on every tag page, the last one included, and that next page is {"tags":[]} with no link.

What changes:

  • The reader follows the next link page by page. Each page keeps its 1 MiB cap, with at most LIMITS.tagListPages (10) pages; past that it refuses by name, as before.
  • A next link is followed only on this package's own tag list on this registry; any other target is refused unread.
  • Installer 2.0.1 → 2.0.2. The installer-v2.0.2 tag publishes it after landing, before the next Martha release pins it.

Proof:

  • Against the real git.macula.io, main's reader refuses (lists more tags than one page) and this branch reads 0.4.1.
  • Installer suite: 159/159.
  • Mutants, each killed: the origin check, the path check, the cap > and -1, never following the link, and no refusal of an off-list link.
  • check:base-tests passes; the two dropped refusal tests are claimed by Drops-test.
  • check:private, check:restated-values, tsc and eslint are clean.
Refs macula-io/martha#149 (gap 1 of the stranger run). With no version named, the installer refused every install: `lists more tags than one page; name a version`. Forgejo's registry sends `rel="next"` on every tag page, the last one included, and that next page is `{"tags":[]}` with no link. **What changes:** - The reader follows the next link page by page. Each page keeps its 1 MiB cap, with at most `LIMITS.tagListPages` (10) pages; past that it refuses by name, as before. - A next link is followed only on this package's own tag list on this registry; any other target is refused unread. - Installer 2.0.1 → 2.0.2. The `installer-v2.0.2` tag publishes it after landing, before the next Martha release pins it. **Proof:** - Against the real git.macula.io, main's reader refuses (`lists more tags than one page`) and this branch reads `0.4.1`. - Installer suite: 159/159. - Mutants, each killed: the origin check, the path check, the cap `>` and `-1`, never following the link, and no refusal of an off-list link. - check:base-tests passes; the two dropped refusal tests are claimed by `Drops-test`. - check:private, check:restated-values, tsc and eslint are clean.
With no version named, the installer refused every install: "lists more tags than one page; name a version".
Forgejo's registry sends `Link: <...?last=<tag>>; rel="next"` on every tag list page, the last one included, and
that next page is `{"tags":[]}` with no link. The installer README promises the highest version when none is named.

The reader now follows the next link page by page, each page capped as before and at most LIMITS.tagListPages
(10) pages, past which it still refuses by name. A next link is followed only on this package's own tag list on
this registry; any other target is refused unread. The fake registry gains laterPages, linkOnLastPage (Forgejo's
shape) and nextLinkTo. installer/package.json and npm-shrinkwrap.json go 2.0.1 -> 2.0.2 for the installer-v tag.

Refs macula-io/martha#149
Drop the two next-page refusal tests: a next link is followed now (#149)
Some checks failed
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 14s
c4 model / c4-model (pull_request) Successful in 0s
dependency advisories / node in installer (pull_request) Successful in 16s
CI / structural floor (pull_request) Successful in 27s
dependency advisories / node in . (pull_request) Successful in 14s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 4s
CI / links resolve (pull_request) Successful in 6s
dependency advisories / advisories (pull_request) Successful in 0s
CI / Martha's names are its own (pull_request) Successful in 30s
CI / no import cycle (pull_request) Successful in 28s
CI / the engine drift check bites (pull_request) Failing after 31s
CI / the host drift check bites (pull_request) Successful in 1m23s
CI / the posted text check bites (pull_request) Successful in 14s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 14s
CI / workflows are valid (pull_request) Successful in 13s
CI / nothing private (pull_request) Has been skipped
CI / no test the base passed goes missing (pull_request) Successful in 36s
CI / the pictures change only with the version (pull_request) Successful in 19s
CI / installer (pull_request) Successful in 2m11s
CI / every check runs in a job (pull_request) Successful in 16s
CI / every job has a timeout (pull_request) Successful in 15s
CI / no literal restates a defined value (pull_request) Successful in 1m8s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 37s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 17s
CI / the relay loads in the recorded host (pull_request) Successful in 15m8s
CI / gate coverage (pull_request) Successful in 16m16s
CI / the clean-install proof removes its container (pull_request) Failing after 18m52s
fe1911820b
Both pinned the refusal that was the bug: Forgejo links every tag page, so they refused every unnamed install.
The new tests read Forgejo's shape, a later page, the page cap both ways, and a next link off the list unread.

Drops-test: installer/read_the_release_registry/read_the_release_registry.node-test.mjs :: refused: a tag list that says there is a next page
Drops-test: installer/read_the_release_registry/read_the_release_registry.node-test.mjs :: refused unread: a tag list that says there is a next page has its body cancelled, not left open

Refs macula-io/martha#149
Merge remote-tracking branch 'origin/main' into venus/149-installer-tag-pages
All checks were successful
CI / the clean-install proof removes its container (pull_request) Successful in 16m17s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 12s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
CI / links resolve (pull_request) Successful in 5s
CI / Martha's names are its own (pull_request) Successful in 28s
dependency advisories / node in installer (container) (pull_request) Has been skipped
dependency advisories / node in installer (pull_request) Successful in 14s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model-1 (pull_request) Successful in 5s
c4 model / c4-model (pull_request) Successful in 0s
CI / structural floor (pull_request) Successful in 29s
CI / no import cycle (pull_request) Successful in 29s
CI / the host drift check bites (pull_request) Successful in 1m4s
CI / the engine drift check bites (pull_request) Successful in 32s
CI / the posted text check bites (pull_request) Successful in 11s
CI / workflows are valid (pull_request) Successful in 12s
CI / installer (pull_request) Successful in 2m9s
CI / no literal restates a defined value (pull_request) Successful in 59s
CI / every job has a timeout (pull_request) Successful in 13s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 12s
CI / nothing private (pull_request) Has been skipped
CI / every check runs in a job (pull_request) Successful in 15s
CI / gate coverage (pull_request) Successful in 17m4s
CI / no test the base passed goes missing (pull_request) Successful in 34s
CI / the pictures change only with the version (pull_request) Successful in 20s
engine drift / the recording says what the engine says (pull_request) Successful in 43s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 41s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 15s
CI / the relay loads in the recorded host (pull_request) Successful in 14m49s
f696fdf766
Review fold-in (Mars, r=1), each a silent partial list or a crash the first round left:
a. A Link header that says rel=next but whose target the reader cannot parse (`<u>; title="x"; rel="next"`) read
   as no next page, so page 1's highest tag won and an older version installed. It is refused by name; rel= in
   another case is read.
b. A later page answering 200 with no tags array ended the list like an empty page. Refused by name; the first
   page keeps its reading (no tags is no version, refused below).
c. A page's tags were spread into push, which overflows the stack on some 250 000 tags inside the 1 MiB cap.
   They are pushed one by one.
d. A next link that is no URL (`<http://[>`) threw a TypeError. Refused by name.
e. The tag list's place is one constant, TAG_LIST.
f. serve_a_release_locally's doc named the removed nextPage option; it names linkHeader and laterPageBody, the two
   options these tests add.

Each guard's mutant fails at least one test; installer suite 168/168; the real registry still reads 0.4.1.

Refs martha-ai/martha#149
Merge remote-tracking branch 'origin/main' into venus/149-installer-tag-pages
All checks were successful
CI / no test the base passed goes missing (pull_request) Successful in 32s
standalone / standalone Martha runs alone (ubuntu-latest) (pull_request) Successful in 33s
dependency advisories / node in . (pull_request) Successful in 14s
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (pull_request) Successful in 13s
dependency advisories / node in installer (pull_request) Successful in 12s
dependency advisories / node in . (container) (pull_request) Has been skipped
dependency advisories / node in carry_marthas_own_node/try_a_single_executable (container) (pull_request) Has been skipped
dependency advisories / node in installer (container) (pull_request) Has been skipped
c4 model / c4-model-1 (pull_request) Successful in 6s
CI / the pictures change only with the version (pull_request) Successful in 17s
standalone / the pinned Node is nodejs.org's (pull_request) Successful in 16s
dependency advisories / advisories (pull_request) Successful in 0s
c4 model / c4-model (pull_request) Successful in 0s
CI / the host drift check bites (pull_request) Successful in 1m10s
CI / the engine drift check bites (pull_request) Successful in 36s
CI / the posted text check bites (pull_request) Successful in 16s
CI / the ring reaches the owner on the live run's tmux (pull_request) Successful in 15s
CI / links resolve (pull_request) Successful in 6s
CI / workflows are valid (pull_request) Successful in 12s
CI / no literal restates a defined value (pull_request) Successful in 56s
CI / every job has a timeout (pull_request) Successful in 15s
CI / structural floor (pull_request) Successful in 33s
CI / installer (pull_request) Successful in 2m7s
CI / nothing private (pull_request) Has been skipped
CI / every check runs in a job (pull_request) Successful in 15s
CI / Martha's names are its own (pull_request) Successful in 36s
CI / no import cycle (pull_request) Successful in 35s
CI / the relay loads in the recorded host (pull_request) Successful in 14m35s
CI / the clean-install proof removes its container (pull_request) Successful in 16m7s
CI / gate coverage (pull_request) Successful in 16m45s
58d4c6a55b
terra manually merged commit 54c34508fc into main 2026-11-24 22:16:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
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
martha-ai/martha!150
No description provided.