Repository navigation
Validate transport activation before preparation; drop the wall-clock assertion (G6 review nits) - #1180
Merged
Conversation
…nal timing Share resource-selection checks between activation preflight and parameter resolution, and reuse the receipt kernel's data-independent contract validator. Name refused resources and paths before registry, CREATE or source reads. Add refusal spies and verify every packaged activation gap. Record the toy A1/A2 cold-run duration without a host-dependent wall-clock assertion. Update the guide, changelog and docstrings to describe the precise checks. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
The #1180 review found that a declaration selection whose `resource` is not a string (for example `{"resource": null, "path": ["factor"]}`) skipped the preflight: `_declared_resource_selections` yielded only string-named selections, so activation passed and registry preparation started before `_param` refused it through `_stem`. That made the guide's "every declaration selection must name a present resource" broader than the code. Yield every mapping that names a `resource`, whatever the name's type, so the shared `_resource_param` check refuses it with its path named before any store creation, registry preparation, CREATE run or source read. `selected` keeps only nonempty string names. Test: names None, "", 7 and ["currency"] are refused before preparation (spies on registry, CREATE inventory, source keys and CREATE.run). With the old string-only enumerator restored in memory, None, 7 and the list fail (DID NOT RAISE); "" already failed closed. test_transport_composed_graph.py 137 passed; test_transport_graph.py 15 passed; ruff check and format pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaxGhenis
added a commit
that referenced
this pull request
Oct 10, 2026
#1180 had not landed when the round-1 fix lane ran, so G7 merges its branch directly; once #1180 merges to main, later merges of main are trivial. The one conflict, packages/microcosm-build/src/microcosm/build/ transport/compose.py, is resolved with the fix lane's tested version: it keeps #1180's preflight (shared resource-selection resolver, malformed names, receipt-contract validator, references, age, pins, null knobs) and adds G7's entitlement/scenario selections and the terminal-package exception. That resolution also carries the lane's finding-5 change (activation reads only rows the entitlement factory instantiates), since both edit the same function. The rest of the lane's fixes follow in the next commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Merged by the NZ hub (session local_e407a527) at a781ae9 with --merge. Gates: |
This was referenced Oct 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #1161 (NZ graph G6, merged). It fixes the two non-blocking nits from that PR's round-3 independent review.
1. Activation preflight now refuses what it said it refuses
Before this change,
validate_transport_activation(build/transport/compose.py) let through two inputs that were refused only later:currency.factor = None). It was refused by_paramonly after registry preparation had started.receipts = {}). It was refused byassign_receiptsonly at run time.Now:
_paramshare one resource-selection resolver. The preflight refuses malformed resource names, missing resources and paths, null selected roots and encoding-shape errors before any store creation, registry preparation, CREATE run or source read. The refusal names the resource and path.column_kernels.pyexposesvalidate_receipt_contract.assign_receipts,takeup.assign@1and the preflight all use it, so there is one contract check, not two copies.docs/agent-guide.md, the changelog fragment and thecli.pydocstrings now say exactly which checks run before preparation, and which checks need runtime data.2. No wall-clock assertion in the functional A1/A2 test
test_a1_a2_three_engines_in_one_run_under_sixty_secondsasserted the toy run took under 60 s. That failed once at 91 s on an overloaded host, so it gated CI on host load. The test is nowtest_a1_a2_three_engines_in_one_run. It recordscold_run_secondswithrecord_propertyand keeps every functional A1/A2 assertion.Tests
test_transport_composed_graph.py133,test_transport_registry.py31,test_transport_graph.py15,test_transport_column_kernels.py29,test_spec_only_country_packages.py8. 216 passed in total.tools/ci_test_plan.py verifypasses, as do ruff check and format.Review
resourcewas not a string skipped the preflight, so the guide's "every declaration selection must name a present resource" overstated the check. It was refused later, so no invalid graph was ever accepted. Finding 2: historical claims in this body (the 91 s host failure, the prior review) are not verifiable from the checkout. They are reported by the hub, and the evidence is in its job folder.resourceis now checked before preparation. The new test fails under the old enumerator: 3 of 4 cases DID NOT RAISE;""already failed closed. Composed graph 137, source-scan rules 15.docs/agent-guide.mdand the changelog. These are the repo's own developer docs describing a build check, not a published number or an outside claim, and the fix makes them accurate. So the hub treats them as not needing Max.Part of Microcosm NZ v0 (d962). Built on a GPT-6.1 Sol Subfleet lane; verified, committed and opened by the NZ hub.
🤖 Generated with Claude Code