Skip to content

feat(website): t27 world discovery -- scan GitHub for every public repository that writes .t27 and vendor it into the catalog - #990

Merged
gHashTag merged 1 commit into
gHashTag:mainfrom
dmitrii-f-t27:feat/t27-world-discovery
Sep 12, 2026
Merged

gHashTag merged 1 commit into
gHashTag:mainfrom
dmitrii-f-t27:feat/t27-world-discovery

Conversation

@dmitrii-f-t27

@dmitrii-f-t27 dmitrii-f-t27 commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

The catalog behind #/specs and the Queen map (/#/queen, "All repositories · shared map") knew five repositories, each typed into apps/website/scripts/sync-t27-specs.mjs by hand. gHashTag/trios (71 .t27 files) sat in the same owner's public inventory unnoticed, and dmitrii-f-t27/trinity-memory (37, the memory specs whose tmem contracts landed in gHashTag/t27#3562) belongs to another owner, so no list would have found it; the "+ Repository" dialog only saves a map on one device. This PR makes the scan a program with a contract, and runs it on a schedule.

Related to #988 (the audit there reads the Queen snapshot: 760 entries, five contributors — "observed snapshot data, not live GitHub counts"). Do not merge without the owner's approval. Deploy stays manual (deploy-site.yml).

What

Contract, as a .t27 spec (no owner, limit or exclusion typed twice)

  • public/t27/files/specs/catalog/discovery.t27, module catalog_discovery: OWNERS (gHashTag, dmitrii-f-t27), CODE_SEARCH extension:t27 + pages, PUBLIC_ONLY, SKIP_FORKS, SKIP_ARCHIVED=false, MIRRORS (ghashtag.github.io is build output), FOUNDING (the five hand-vendored sources the scan never rewrites), PROBE_FILES 8, MIN_DECLARATIONS 1, limits. 5 test blocks / 18 asserts. The script reads it through the vendored wasm, checks the schema (checkSchema), refuses non-ASCII, a dropped item, a wrong module, and evaluates the tests (runSpecTests) before the first GitHub call.

Scan → vendor

  • scripts/discover-t27-worlds.mjs scan --out NEW.json: owner inventories (users/<owner>/repos, identity checked against html_url/owner.login), GitHub code search hits as extra candidates (best effort; status recorded), default-branch tree per candidate (.t27 blobs, .git/.claude worktree copies and files over MAX_FILE_BYTES set aside), then up to PROBE_FILES files compiled with the vendored wasm, spread evenly over specs/ paths first, stopping at the first that qualifies. A repository qualifies only when a probed file yields a declaration (fn/struct/enum/const/type/test/invariant/bench): the compiler accepts any text as an empty module, so "it compiles" proves nothing — code search returned 2 244 hits in 10 repositories, all licence texts and perf logs named .t27, all rejected. Spread sampling, not the first three: trinity-fpga's first three specs by name parse to empty modules under the vendored compiler (newer syntax), while 26 of its 64 do not.
  • scripts/discover-t27-worlds.mjs vendor --report X: tarball at the scanned commit, byte-level dedup against the catalog (tt-trinity-euler/phi are 49/49 duplicates of chips/ and leave no record; gamma differs in one file), files under public/t27/files/<name>/ (gHashTag, the founding convention) or <owner>/<name>/ (any other owner — two owners with one repository name cannot collide), manifest merge that replaces the world's previous entries and leaves every other entry byte for byte. Refuses a founding source, a stale contract (report sha ≠ spec sha), a duplicate path.
  • scripts/t27-corpus.mjs: describe/deriveTags/summarise/entry/aggregates/RU-audit exceptions moved out of sync-t27-specs.mjs so both writers derive an entry the same way. The old and new sync were run on the same input (t27 @ bff21b85, T27_SKIP_REMOTE=1): manifest, files and qa/language-exceptions.json byte-identical.
  • scripts/universe-atlas.mjs scan: repeated --owner, --discovery report.json (owners come from the contract; the atlas carries discovery.worldScan), and every catalog source outside the owner inventories is read on its own — the atlas refuses a spec whose repository is not a world.
  • src/lib/sharedSpecCore.ts: sourcePath strips <owner>/<name>/ as well as <name>/ (the indexer sha changes; core and atlas rebuilt).

Schedule

  • .github/workflows/t27-world-scan.yml: daily (17 3 * * *) and on dispatch. scan → vendor → core index → skills/agents/docs generators (they pin the manifest sha) → atlas scan → atlas build → gates → commit, the way signal-health-self.yml commits its numbers. Public reads only, github.token. Never publishes: deploy-site.yml stays the manual, approved step.
  • website-checks.yml: npm run check:discovery on every PR.

QA

  • qa/t27-world-discovery.mjs (new, in website-checks): contract loads and its tests hold; a failing spec assert, a bare ; before module, a wrong module are problems; identity (foreign html_url, owner mismatch) rejected; verdicts (private/fork/mirror skipped, archived kept, founding reported-not-vendored); tree filter; spread probe; licence/JSON/empty text = 0 declarations, hello_world and this contract qualify; prefixes; merge (order, aggregates, replace-on-refresh, input not mutated, founding refused, path outside prefix refused); the workflow runs the steps and touches no deploy token.
  • qa/queen-catalog-hive.mjs and qa/spec-catalog-contract.mjs derived their pins (760 specs, 5 repos, 68 trinity-fpga issues) from the manifest/atlas instead of freezing a snapshot; the five founding repos must still be on the map. qa/queen-continuous-map.mjs: the readability bound is an equality at 390×300 and floating point landed 3·10⁻¹⁴ px under it once the field held eight repositories — tolerance 10⁻⁶ px.

UI: the atlas scope panel (?view=atlas → details) shows the scan: owners and the count of repositories with .t27 specs, EN/RU.

Measured (scan of 2026-09-12, report in the atlas discovery.worldScan)

before after
repositories on the map 5 8 (trios 58 specs after 13 duplicates, trinity-memory 37, tt-trinity-gamma 1)
catalog specs (distinct bytes) 760 856
open issues in the snapshot 651 1 030
owners 1 2
candidates inspected — 121 (gHashTag 107, dmitrii-f-t27 14) + 10 from code search; skipped: 27 forks, 1 mirror, 83 without .t27, 4 without a declaration

Founding five untouched (t27 575, tri-net 113, trinity-fpga 64, trinity 3, tt-trinity-corona 5), hello_world still featured.

Verification

check:discovery         PASS (contract 5 tests / 18 asserts, owners gHashTag, dmitrii-f-t27, 3 scanned worlds)
check:spec-catalog      PASS (856 exact source links, identity, SHA pinning, fail-closed paths, embedded Explorer)
check:queen-catalog     PASS (856 real specs, 8 contributing repos, exact source edges, no fake issue identity)
check:queen-continuous  PASS (8 repositories, 1030 distinct issues, 856 specs, picking + non-overlap + stable updates)
check:queen-spec-mirrors PASS (856 canonical specs, 856 source placements)
check:queen-atlas, check:shared-core, check:queen-worlds, check:skills-catalog, check:crons-catalog,
check:agents, check:tools, check:docs, check:viewport, test:viewport-spec, check:queen-languages,
check:explorer-languages, check:api, check:aria, check:silicon, check:clients-console,
typecheck:ratchet, test:sync-skills, test:sync-crons, test:agents-specs, test:docs-specs   PASS
vite build              ok; /#/queen served from dist: 8 REPOSITORIES · 856 .T27 · 1030 ISSUES

What this does not do

  • It does not refresh the five founding sources. They come from a local t27 checkout through sync-t27-specs.mjs, and that checkout carries the teaching course (specs/tutorial, hello_world) on a branch that is not on t27 master (checked at 28652b3): a re-vendor from GitHub alone would delete it from the site. t27 master holds 940 .t27 today against 575 vendored; that refresh remains the owner's manual step until the course lands.
  • The vendored compiler is the one from t27 1cd2877f9; 33 of trinity-memory's 37 and 38 of trinity-fpga's 64 specs read as warn under it (newer syntax dropped by recovery). Health is what that wasm says, no more.
  • Code search is a hint, not the inventory: the index did not contain trinity-memory at all. Owners outside OWNERS reach the map only if code search indexes them and the probe agrees.
  • Daily commits of universe-atlas.json (~780 KB) whenever an issue title changes. If that churn is unwelcome, weekly is one line in the cron.

Dmitrii Fedorov (@dmitrii-f-t27)

…pository that writes .t27

The catalog behind #/specs and the Queen map knew five repositories, each typed
into scripts/sync-t27-specs.mjs by hand. gHashTag/trios (71 .t27) sat in the
same owner's public inventory unnoticed and dmitrii-f-t27/trinity-memory (37)
belongs to another owner; the "+ Repository" dialog only saves a map on one
device. The scan is now a program with a contract.

- public/t27/files/specs/catalog/discovery.t27 (module catalog_discovery):
  OWNERS, MIRRORS, FOUNDING, PROBE_FILES, MIN_DECLARATIONS, limits; 5 tests,
  18 asserts, read through the vendored compiler before GitHub is touched.
- scripts/discover-t27-worlds.mjs scan/vendor: owner inventories + code
  search hits, default-branch trees, compile probe (a repository qualifies
  only when a probed file yields a declaration -- the compiler accepts any
  text as an empty module, and code search returns licence files named
  .t27), tarball vendoring with byte-level dedup, manifest merge that never
  touches a founding source.
- scripts/t27-corpus.mjs: entry/tag/summary/aggregate code shared with
  sync-t27-specs.mjs (old and new sync verified byte-identical on the same
  input). universe-atlas.mjs scan: repeated --owner, --discovery, catalog
  sources outside the inventories read on their own.
- sharedSpecCore.sourcePath strips <owner>/<name>/ as well as <name>/.
- QA: qa/t27-world-discovery.mjs; catalog-hive and spec-catalog contracts
  derive their counts from the manifest instead of pinning 760/5; the
  continuous-map readability bound tolerates 1e-6 px (it was an equality).
- .github/workflows/t27-world-scan.yml: daily scan, vendor, index,
  generators, atlas, gates, commit -- like signal-health-self.yml. Publishing
  stays with deploy-site.yml.
- Atlas scope panel shows the scan (bilingual).

Scan 2026-09-12: 121 repositories of gHashTag + dmitrii-f-t27, code search
2244 hits in 10 repositories all rejected by the probe; new worlds
dmitrii-f-t27/trinity-memory (37 specs), ghashtag/trios (58 after dedup),
ghashtag/tt-trinity-gamma (1). Catalog 760 -> 856 specs, 5 -> 8 worlds,
atlas 1030 open issues. All website checks green locally.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gHashTag
gHashTag merged commit 79ffb03 into gHashTag:main Sep 12, 2026
18 of 23 checks passed
github-actions Bot added a commit that referenced this pull request Sep 12, 2026
Merge pull request #990 from dmitrii-f-t27/feat/t27-world-discovery

feat(website): t27 world discovery -- scan GitHub for every public repository that writes .t27 and vendor it into the catalog
gHashTag pushed a commit to gHashTag/t27 that referenced this pull request Sep 12, 2026
Closes #3563 -- S01 of gHashTag/trinity#988.

specs/trinity/project.t27 (module trinity_project) pins the consumer
gHashTag/trinity at 976df517 and declares the seven profiles with headless
as the initial one, the eight dispositions, the five evidence tags of
docs/system/project.md, the dialect and build counts the inventory
measured, the four dependency pins and the twelve work packages S01..S12.
Fifty capability cards specs/trinity/capabilities/<id>.t27 give every
shipped build target and every requested capability an owner, a
disposition, a canonical spec and dialect, implementation and generated
paths, a backend, the build.zig targets it owns, an acceptance command,
an evidence status with its source and a work package.

tools/trinity_manifest.py derives the inventory from a clean pinned
checkout (inventory --trinity-root; a modified tracked file is refused)
and holds the cards to it (check): 51 executables, 6 libraries, 73 tests
and 68 steps are each owned by exactly one card, default-installed
targets are headless and !ci_mode-guarded ones are not, every trinity:
path is tracked, the website mirror is never canonical, DIALECT follows
the extension of CANONICAL_SPEC, only executable/adapter/research cards
claim a backend, no spec has two owners, measured names its command and
source, every work package has a card. --self-check plants thirteen
defects and requires each to be reported. The inventory and the derived
report are committed under conformance/trinity/.

specs/catalog/discovery.t27 is the canonical copy of the world-scan
contract gHashTag/trinity#990 vendored under the site's mirror path;
specs/OWNERS.md registers catalog/ and trinity/.

Evidence is what a public CI log measured: zig build -Dci=true succeeded
on ubuntu-latest at 79ffb034 (one data commit before the pin); the test
step is piped through tee there and its exit code is not measured
(gHashTag/trinity#616), so no card claims a passing test.

Seals for the 52 files by t27c seal --save at 03f0faf; t27c typecheck
reports 0 errors on each; published_figures test-blocks pin 12593 ->
12653 with the movement recorded next to the pin.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants