feat(compiler): show elsewhere owners and owner verification #354
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/342-elsewhere-owners"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #342
The client side of owners that publish elsewhere, and the owner line of
torb add(RELEASE.md 7.1, 7.6, 7.13).What changes
1.
feat(compiler): owner file fetch and the elsewhere messagecompiler/src/package/fetch.trb:fetchOwnerfetchesindex/<owner>/owner.trbthe wayfetchIndexfetches an index file. Both now share the privatefetchIndexFile: mirrors come first, and the cache copy goes in<cache>/index/<registry>/<owner>/owner.trb. Under--offline, a missing copy givesNone, not an error.signedOwnerruns only for a registry that lists keys. It checks the file withverifiedOwner(7.14) and refuses a file whosechangedis smaller than the cached copy's, which is the rollback guard the format'schangedis there for. It writes the copy only after the file verifies.compiler/src/cli/packages.trb: when a package file is a 404,newestRelease(torb add acme/x) andresolved(torb add acme/x@^1and every resolution) read the owner file. Anelsewhere:in it fails with:the registry <url> has no package `far/tool`: `far` publishes at <url> (verified domain far.example); bind it in project.trb with `registry "far", url: "<url>"`domain:lists up to five, separated by spaces, since #341) or a subdomain of one; it then names all of them (verified domains a.com, b.com).2.
feat(compiler): owner line oftorb add,torb owner list, docstorb addprintsowner acme (organisation, 3 years old, verified domain acme.com)for each owner of a registry package named on the command line that was not in the lock before.--offlineit comes from the cached copy.torb owner listprintsacme (organisation, verified domain acme.com), thenpublishes at <url>, not at this registry, then the members.OwnerView.domainis the space-separated list of proved domains (#341); several are printed asverified domains a.com, b.com. Without a domain or elsewhere the output is the same as before.docs/tooling/torb-add.md(two new sections),docs/tooling/torb-owner.md, and a RELEASE.md 7.13 "as built" row. The #342 item is removed from the "Not built yet" list.skills/is regenerated.No
tools/registry/srcchanges, so nothing overlaps with #341.Test
tools/registry/tests/client.test.trb, new group "the owner files of the signed index", run against the registry's files over HTTP:add far/toolandadd far/tool@^1), withproject.trbunchanged.addprints the three-years-old owner line, a secondaddprints nothing, and--offlinereads it from the cache.torb owner listshows the kind and the elsewhere line.addalso assertsowner acme (organisation, less than a day old).compiler/tests/registry-commands.test.trb:ownerListLineswith and without domain and elsewhere, with two domains, and for a person.torb checkoncompiler(388 files) andtools/registry(48 files) is clean;torb format --checkon the touched files is clean;torb test tests/registry-commands.test.trbpassed 17 of 17;torb docs skill docs skillsregeneratedskills/;pdisc checkis ok;tools/check-commits.shis clean. The client test needs a toolchain built from this branch, so it runs in CI.Update 2026-10-13
Rebased onto
main(0d10b99; conflict indocs/design/RELEASE.mdresolved, #341 already off the "Not built yet" list) and addedfix(compiler): read the several domains an owner file listsfor Argus's finding ondomain:as a list. The checks listed under Test were run before the rebase; after it, onlypdisc checkandtools/check-commits.shwere re-run locally (no toolchain on this host), the rest is CI's job on the new head.54c9767e2ee75c93d5dde75c93d5dd4de33d0da8Checklist at
4de33d0: tests ok (new client group plusownerListLinesunit test, CI green on this head), correctness ok (owner file only from a registry that signs, rollback guard onchanged, copy written only after verification, URL printed never bound/fetched, owner line computed before any write), scope matches #342, security ok, docs andskills/updated, pdisc green.Changes requested
mainindocs/design/RELEASE.md.mainmoved by two commits since the merge base (9a37d4everified domains by DNS TXT record,0d10b99docs(registry): document verified domains), and a trial rebase of this branch ontomain(0d10b99) stops at4de33d0with a content conflict indocs/design/RELEASE.md(the "Not built yet" paragraph and/or the 7.13 as-built table, both of which #341's docs touch). Please rebase onto currentmainand resolve it: with #341 now merged, "verified domains (#341)" should leave the "Not built yet" list asmainhas it, and the new 7.13 row should keep the wording about the domain consistent with whatmainsays aboutOwnerView.domainand the PR body's "shows up once #341 fills it". Everything else is mergeable as is; after the rebase CI must be green on the new head. Re-runpdiscandtorb docs skill docs skillsif the rebase touches the docs.Addendum to my review (finding 1) on
4de33d0, found while checking the rebase againstmain: [blocker]domain:is a list onmain. Since #341 (9a37d4e) an owner may hold up to 5 proved domains, and RELEASE.md (7.1, as built 2026-10-13, #341) says they go intodomain:of the owner file "sorted and separated by spaces". This PR treatsOwnerRecord.domainas one domain:ownerLineprintsverified domain a.com b.comfor two domains, andelsewhereOfcompares the host with the whole string, sopackages.a.comis never reported as verified for an owner holding two domains. Please splitrecord.domainon spaces in both places (owner acme (organisation, 3 years old, verified domains a.com, b.com)or similar, and verified if the host equals or is under any of them), do the same forownerListLinesifOwnerView.domainis a list onmain(checktools/registry/src/api.trb), and add a test with two domains. Same head, so this is part of finding 1 and not a second round.4de33d0da885667226b0Addressed on
8566722: rebased onto main (0d10b99), resolved the RELEASE.md conflict (#341 stays off the "Not built yet" list, the 7.13 row says domains), anddomain:is now read as a space-separated list inownerLine,elsewhereOf(verified when the host equals or is under any domain; message names all,verified domains a.com, b.com) andownerListLines.OwnerView.domainon main is the joined string (plus adomainslist the API does not expose to the client), so the client splits the string. Tests: two-domain case in the client group and inownerListLines. Docs and theskills/copies updated by hand (no toolchain here fortorb docs skill; only the sentences touched differ from the old output). pdisc and check-commits are green; CI runs on the new head.85667226b091fe30939fmain moved again (
15184a9, #343 re-check of verified domains) and conflicted once more indocs/design/RELEASE.md("Not built yet" paragraph). Rebased onto15184a9and resolved: #343 stays off the list as on main, the #342 item leaves it and the as-built sentence stays. The domain-list fix from8566722is unchanged (now91fe309). Merge is clean against main; pdisc index/check green locally. CI runs on the new head.91fe30939fd68737dfbdd68737dfbd25559c5f02Re-review at
25559c5(earlier findings: rebase conflict anddomain:as a list).main; #341/#343 stay off the "Not built yet" list, #342 leaves it.domain:list:domainsOf/verifiedDomainsTextare shared byownerLine,elsewhereOf(verified when the host equals or is under any listed domain) andownerListLines; two-domain tests in the client group and inownerListLines. Fixed.changed, copy written after verification, owner line computed before any write), docs andskills/: ok as in my first review.Non-blocking: none.