Repository navigation
test(lifecycle): corpus train 1 (T-1 batch 1 + T-2 drain 1) - #4598
Merged
Merged
Conversation
A deterministic spine on the shared lifecycle world walks six gate levels (gate off, allowed, revoked after deploy, denied before deploy, unapproved, org dependency deny) and credits G1 machine ids through check_obligation after I1-I9 on every step. witnesses.py translates them anchored on GATE. Refs #4564 Refs #4565 Co-authored-by: Copilot App <[email protected]>
Refs #4564 Co-authored-by: Copilot App <[email protected]>
Credit no bin cell (no spine step observes a bin outcome), keep .github/instructions unchanged under install --mcp, compare MCP servers against a set read before the command, hold prune under a dependency deny to never-widen, and require each resolving step to deploy exactly the model's observable set. Refs #4564 Co-authored-by: Copilot App <[email protected]>
#4006/#4019 shifted the update command options by 8 lines, so test_every_rule_cites_code_that_still_says_it failed on the merge. Refs #4564 Co-authored-by: Copilot App <[email protected]>
…T-2 drain 1)
M-SOURCE now credits context ids X|<op>|<form>|<FACTOR>=<value> at the
real steps that ran in that state (scope, network, unchanged target set,
gate, a clean prior deployment, --force/--update/--frozen/--target), and
the generator reads each one as {OP, SRC, FACTOR}. Native plugins name
the primitives they carry (skill, mcp, bin via p-native-claude-bin), the
LSP bundle joins the bundle form, and compile/lock now act on a project
holding a local bundle. One context pass (multi-target, force/update,
frozen, bundle reinstall) adds 10 CLI steps to the spine.
Baseline 1468 -> 1380 (T-2 496 -> 408); one strict known cell:
X|install|pkg-registry|UPDATE=on (#4572, a git->registry source switch
leaves a stale .apm-pin until install --update drops it).
Also re-anchors the update.py evidence lines of the generator rules,
which drifted on main (test_every_rule_cites_code_that_still_says_it).
Refs #4564
Refs #4565
Co-authored-by: Copilot App <[email protected]>
…nfigured
GATE=none is GateLevel('none', authority=None): no executables gate.
The lifecycle world configures executables.allow, so a skill-only
package there has no gate level; its GATE=none cells move to the
gate-off phase of the next batch.
Refs #4564
Co-authored-by: Copilot App <[email protected]>
…2-source-drain # Conflicts: # tests/quality/lifecycle_obligations.json
Daniel Meppiel (danielmeppiel)
requested a review
from Sergio Sisternes (sergio-sisternes-epam)
as a code owner
November 21, 2026 11:04
This was referenced Nov 21, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The tests credit obligations without exercising the relevant gate states, deployment artifacts, or target history, allowing missing outputs, no-ops, and collateral removals to earn receipts.
6 open issues
Other-file compile credits lack output and gate-outcome checks · New MCP credits use gate states not exercised on the requested server · New Gate-off install oracle misses omitted servers and collateral removals · New Native primitive deployment obligations lack observable witnesses · New Manifest-only installs incorrectly advance bundle target history · New Unapproved p-exec bundle earns compile and hook receipts without evidence · New
What changed in this PR
This train combines the M-GATE and M-SOURCE lifecycle coverage batches for #4564, aiming to reduce unwitnessed obligations without changing production behavior.
Changes:
- Adds a deterministic gate matrix covering six gate states with lifecycle oracle receipts.
- Expands source witnesses with execution context, native primitives and local bundles, plus a strict known cell for #4572.
- Extends the shared model, runner and witness translation to support both batches.
| File | Description |
|---|---|
tests/lifecycle/world/test_world.py |
Adds expected results for the dependency-deny policy. |
tests/lifecycle/world/services.py |
Defines the matrix's dependency-deny policy. |
tests/lifecycle/model/state.py |
Models gate-off behavior and the new policy. |
tests/lifecycle/model/expected.py |
Allows executable deployment when the gate is off. |
tests/lifecycle/machines/test_m_source.py |
Adds context credits, native and bundle coverage, and a known defect cell. |
tests/lifecycle/machines/test_m_gate.py |
Runs the matrix and checks receipt completeness. |
tests/lifecycle/machines/_kit.py |
Extracts a reusable deterministic step runner. |
tests/lifecycle/machines/_gate_matrix.py |
Implements the six-state gate matrix and outcome checks. |
tests/lifecycle/generator/witnesses.py |
Translates source context and gate matrix receipts into obligations. |
Review effort: Balanced
Per review on the corpus train: drop other-file credits (no compile-staged output is asserted for copilot) and MCP credits of install --mcp (the requested registry server is never gated). The U7 oracle now asserts the requested server is declared, locked and configured, that no other server appears, and that only servers the gate no longer allows may go, with a negative control for each defect. Refs #4564 Co-authored-by: Copilot App <[email protected]>
Refs #4564 Co-authored-by: Copilot App <[email protected]>
…gets, bundle ops) - Native plugins are observed by the primitives they carry (skill, MCP) as well as the gated native unit, so an unapproved native deployment is an I4 violation the oracle sees. - TGT=*-unchanged is judged per slot: a step is "unchanged" for a form only when that form's last resolving step ran under the same targets. The context pass installs the bundle twice under the multi-target set. - compile and lock no longer act on a local bundle in this batch: an unapproved bundle deploys nothing, so those cells wait for the gate-off batch, where its artifacts are deployed and checked. Baseline 1468 -> 1390 (T-2 496 -> 418), 1 strict known (#4572). Refs #4564 Co-authored-by: Copilot App <[email protected]>
This was referenced Nov 21, 2026
Merged
3 of 10 tasks
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.

Description
Corpus train 1 lands the ready lifecycle-corpus batches together with ONE regenerated
tests/quality/lifecycle_obligations.json. Each source PR rewrites that generated file, so landing them one by one would invalidate the next. Both source branches are merged with--no-ffto preserve authorship (no squash). The JSON is produced bypython -m tests.lifecycle.generatoron the merged tree, never hand-merged. The only manual resolution is thewitnesses.pymodule docstring, which now lists both the M-SOURCE context ids and the M-GATE matrix ids.Train total, regenerated on the merged tree:
Baseline by lane: T-1 254 -> 133, T-2 496 -> 418, T-7b 63 -> 47; other lanes unchanged. Counts are the generator's output on the merged tree, not a hand sum. Review fixes on both source branches (#4575 ac8a431/1e81bf9, #4592 52732d2) are re-folded (merge, then regenerate).
The source PRs stay open, are linked here, and are superseded by this train.
Issue and approved scope
Issue: Refs #4564, Refs #4565
Human scope-approval comment: #4564 (comment)
Does this PR complete the issue, or what remains? No. #4564 closes when the baseline is <= 500 (1234 after this train). Further T-1, T-2 and T-3 batches follow.
Type of change
Testing
On the merged tree (macOS, host-guarded):
python -m tests.lifecycle.generator --check-> up to datepytest tests/quality/test_promise_obligations.py tests/quality/test_generated_obligations.py tests/lifecycle/generator/test_generator_rules.py tests/quality/test_gate_cell_obligations.py-> 80 passeduvx [email protected] checkandformat --check(src, tests, scripts), pylint R0801 (10.00/10),lint-auth-signals.sh,check_complexity_ratchet.py --base-ref origin/main,tests.quality.taxonomy --changedandcheck_test_assertions.py-> all cleanThe source PRs' own validation (machine spines on the engine driver) is in #4575 and #4592. The lifecycle shards here run both spines at the train head.
Changelog
## [Unreleased]inCHANGELOG.md.Spec conformance (OpenAPM v0.1)