Skip to content

test(discovery): add the 120-entry install manifest - #58

Merged
pengyuzhang merged 2 commits into
mainfrom
pr/02-manifest
Aug 23, 2026
Merged

test(discovery): add the 120-entry install manifest#58
pengyuzhang merged 2 commits into
mainfrom
pr/02-manifest

Conversation

@pengyuzhang

Copy link
Copy Markdown
Collaborator

First of a stacked series building the end-to-end harness specified in Discovery/tests/README.md. This one is the inventory itself — the part that most needs domain review, which is why it lands alone rather than under several thousand lines of Python.

What this is

The 120 rows of the test plan, as data the harness can execute. Each entry carries a stable id, the platforms it applies to, how it arrives on a machine, and what the collector is expected to report about it.

manifests/tools.toml       50   T-CLI, T-APP, T-EXT, T-RT, T-CHAN
manifests/mcp.toml         29   M-SITE, M-PIN, M-SP
manifests/artifacts.toml   19   S-01 … S-19
manifests/agents.toml      12   AG-01 … AG-12
manifests/negative.toml    10   N-01 … N-10
manifests/canaries.toml     6   credentials, by shape - never by value
manifests/sources.toml     30   vendor urls and silent flags, per OS

manifest.py is the only reader of those files. Everything downstream works on Entry objects, so a format change touches one file.

Two decisions worth reviewing

TOML, not YAML. The manifest is reviewed like code and the reasoning beside an entry is most of its value, so the format has to keep comments. TOML also parses with tomllib from the standard library, which is what lets the harness run from the test directory with nothing installed.

The recipe family is derived, not declared. A row that said family = "artifact" while carrying an install block would be executed one way and reported another. The block is the declaration.

Numbers that should match the plan

mac linux win
applicable entries 110 105 103

All 42 catalog ids have exactly one row. 51 entries — declare-mcp and artifact — need no installer at all, which is what makes an early automated run substantial rather than a token slice.

Verification

$ python3 -m unittest discover -s tests -t . -q
Ran 9 tests in 0.004s
OK

Nine tests cover the counts, the per-OS denominators, the family totals, and the load-time rules. The three CI-facing checks — catalog coverage, id contiguity, canary declaration — arrive in the next PR with the workflow job that runs them.

Turns the inventory in tests/README.md into data the harness can execute:
every row becomes an entry with a stable id, the platforms it applies to, the
block that describes how it arrives, and the fields the collector is expected
to get right about it.

TOML rather than YAML so the file keeps its comments - the manifest is
reviewed like code, and the reasoning beside an entry is most of its value -
and so the loader needs nothing but the standard library.

Four entry shapes cover all 120 rows, distinguished by which block an entry
carries: install, declare, create or state. The recipe family is derived from
that block rather than declared beside it, so the two can never disagree about
how an entry is executed.

Validation happens at load: an unpinned package, a variant naming a base that
does not apply on its platform, or an unknown install method fails immediately
rather than twenty minutes into a VM run.
@pengyuzhang
pengyuzhang merged commit 61af8d9 into main Aug 23, 2026
8 checks passed
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