Repository navigation
refactor: remove declarative artifact graph - #3974
Conversation
|
Warning Review limit reached
Next review available in: 78 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (34)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@codex review\n\nPlease review exact pushed head |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
7b9a4d1 to
71fe370
Compare
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
71fe370 to
d12995d
Compare
|
@codex review exact head d12995d after rebasing onto parent repair 86b5b39. The real-route focused suite passed 85/85 and all ten quick-gate steps passed. Audit the declarative-topology purge for lost runtime capability and the context-local bound-execution handoff for concurrency, nesting, audit sequencing, and stale-plan bypass. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d12995d8c2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3ffd1052bc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
3ffd105 to
0a6ecfe
Compare
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
0a6ecfe to
3b63d92
Compare
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
34cf6ef to
5ab1a9a
Compare
5c47314 to
e49a320
Compare
bbc6806 to
a771aef
Compare
a771aef to
e004b50
Compare
Retire the self-attesting runtime artifact/path graph and its scenario metadata propagation. Keep OperationSpec control-plane and mutation-authority policy fields, while preserving real command, campaign, corpus, and execution metadata. Ref polylogue-a7xr.19
Problem: bound mutation execution revalidated a plan but called the actuator directly, bypassing OperationExecutor.execute and its MCP anti-vacuity contract.\n\nWhat changed: delegate the final bound effect through the executor with a scoped prevalidated-plan marker. Bound execution retains its typed freshness and audit checks; ordinary execute callers still revalidate independently.\n\nA regression test proves bound execution reaches the executor gate exactly once.
Use a context-local immutable stack for execute_bound prevalidation state so shared executors remain safe across threads and nested calls. Add a real two-thread archive regression that forces overlapping scopes and verifies both tag receipts complete without unknown audit effects.
Order the two bound executions so the first scope is active before the second overwrites the legacy shared marker, while retaining the barrier and real audit routes.
e004b50 to
39957d6
Compare
## Summary Replace Polylogue's bespoke seed, shard, mutation-proof, and repair registries with one automatic native `pytest-testmon` lifecycle owned by plain `devtools verify`. Every managed native pytest lane now runs under a closed-world command and environment contract, including ordinary affected selection. ## Problem The prior harness exposed several repair commands and separate state registries while still allowing stale or incomplete dependency authority. Untraceable runtime-data changes could select zero tests, deleted or moved modules could leave stale graph inputs, inherited pytest controls could suppress test bodies or narrow collection, configured discovery could omit failing tests, and linked worktrees could reuse or replace another checkout's database. Historical verification receipts could also be mistaken for current release authority. Classifying individual pytest options was not a stable security boundary. `--setup-only`, `--collect-only`, positional selectors, `--ignore-glob`, `--last-failed`, configured `addopts`, configured `testpaths`, discovery patterns, and ambient plugins all provided independent ways to change what a managed invocation executed. ## Solution - Make plain `devtools verify` create, validate, copy, repair, and replace native testmon state automatically. No operator or agent seed/repair command remains. - Replace the old shard, seed, testmon-state, and mutation-proof machinery with one native two-lane correctness corpus and one typed verification record. - Give affected, bootstrap, and full lanes one exact positive command contract: the explicit `tests` root, repository-owned file/class/function patterns, an empty recursion exclusion, empty configured `addopts`, and only explicitly owned pytest plugins. - Remove `PYTEST_ADDOPTS` and `PYTEST_PLUGINS` from every managed native child and disable ambient plugin autoload. Record addopts neutralization, plugin neutralization, and closed-world collection for each lane; release authority depends on those recorded invariants. - Validate the complete generated command instead of maintaining a pytest option deny-list. Added selectors, ignores, deselection controls, positional targets, or later overrides invalidate the managed-command receipt. - Force complete selection for untraceable package, test-runtime, and packaging changes. Exclude the intentional performance benchmark tree from correctness graph requirements. - Treat deleted and moved Python paths as bootstrap triggers, then require post-build graph edges only for executable paths that still exist. Ordinary imports are executable; `TYPE_CHECKING`-only imports remain declarations. - Bind testmon SQLite access to one no-follow checkout-owned directory descriptor through preparation, both lanes, and final inspection. Reject symlinked parents, database files, and sidecars; serialize the complete lifecycle with a checkout-local lock. - Keep the checkout mutation monitor active through final Git HEAD and worktree fingerprint sampling on normal, preflight-failure, runner-exception, and interrupt paths. Every exceptional finalization denies release authority. - Pin the validated native plugin range to `pytest-testmon>=2.2.0,<2.3.0` and assert the private schema contract used by the inspector. - Preserve the #3950/#3974 deletion set during the final rebase. Retired campaign, catalog, Beads, and evidence modules were not restored. ## Verification - `direnv exec . devtools workspace verify-worktree /realm/worktrees/polylogue-native-testmon --expect-branch feature/test/native-testmon-lifecycle`: isolated linked worktree verified at exact head `c7556c982384dac9948f142301769088d0eee2da`. - `direnv exec . devtools test tests/unit/devtools/test_verify.py tests/unit/devtools/test_testmon_bootstrap.py`: **227 passed in 34.63s**. This covers exact command construction, all three native modes, typed release authority, finalization paths, lifecycle locking, Git-authority monitoring, schema compatibility, change classification, plugin declarations, and symlink refusal. - `direnv exec . devtools test tests/integration/devtools/test_native_testmon_lifecycle.py -k 'production_affected_verify_neutralizes_execution_suppressing_addopts or production_verify_fails_closed_on_dynamic_pytest_plugins or managed_native_launch_keeps_state_inode_bound_during_parent_replacement or managed_native_routes_reject_replaced_cache_parent or production_verify_all_owns_complete_test_root_over_configured_testpaths or production_verify_all_neutralizes_external_pytest_addopts'`: **14 passed, 17 deselected in 126.43s**. Real nested `devtools verify` invocations prove affected failing bodies execute under inherited `--collect-only` and `--setup-only`; full lanes cannot be narrowed by positional selectors, ignore globs, last-failed state, configured addopts/testpaths/discovery, or ambient plugins; dynamic repository plugin declarations fail closed; and parent replacement cannot redirect managed SQLite state. - `direnv exec . devtools verify --quick`: all 10 format, lint, strict mypy, render, layering, command, schema, and promotion-audit gates passed in **28.17s**. The receipt records matching initial/final head `c7556c982384dac9948f142301769088d0eee2da` and matching worktree fingerprints. - `git merge-base --is-ancestor b0cee7b HEAD`: success. The branch is rebased onto the requested stable master. - All 27 review threads were classified against current code, answered with concrete evidence, and resolved. The final thread was an outdated operations-layer concern on a file byte-identical between exact base and head, so it was recorded as a potentially valid base issue but non-actionable for this verifier-scoped PR. Five independent adversarial review iterations were run. Each in-scope finding was fixed and covered; the loop reached its five-iteration cap after the fifth fixes, so this does not claim an unrun sixth clean iteration. ## Acceptance criteria | Criterion | Disposition | Evidence | | --- | --- | --- | | Fresh main checkouts and linked worktrees acquire usable testmon state automatically | Satisfied | Production lifecycle tests cover absent state, main-checkout build, linked-worktree copy/rebind, malformed cache recovery, and atomic replacement. | | Runtime or packaging data changes cannot yield a green zero-selection run | Satisfied | Change classification forces the complete correctness corpus, including additions and deletions. | | Deleted and moved modules cannot preserve stale release authority | Satisfied | Deleted paths trigger bootstrap while post-build requirements include only extant executable paths; real deletion and rename routes are covered. | | Ambient or configured pytest controls cannot suppress bodies or narrow managed authority | Satisfied | All native lanes own the exact command, environment, plugins, discovery, and explicit `tests` root. Production regressions observe failing parallel and load-sensitive bodies. | | Parallel and serial lanes use the same authority contract | Satisfied | Both commands come from one builder and every aggregate requires both lanes to attest neutralization and closed-world collection. | | Testmon state replacement is checkout-owned and race-safe | Satisfied | Parent/file/sidecar validation, no-follow directory binding, lifecycle locking, and mid-run parent replacement tests cover the production route. | | Historical or exceptional receipts cannot grant current release authority | Satisfied | Typed scope compatibility remains diagnostic; checkout drift, preparation failure, runner exceptions, and interrupts finalize with release authority denied. | | Manual seed, shard, and repair bureaucracy is removed | Satisfied | Legacy commands, registries, mutation-proof modules, seed-recovery suite, and scale-fixture registry remain deleted after rebasing. | ## Remaining scope `polylogue-lvz6` still owns final release-authority convergence. This PR supplies the automatic test-selection and baseline substrate; it does not claim that the production archive is release-ready. ## Stack resolution The branch is rebased directly onto stable master `b0cee7b99c36a7f8eb94bf122782255f42072709`. No further retarget or intermediate restack is required. <!-- polylogue-pr-scope:v2 { "assigned_beads": [], "dispositions": [], "mutated_beads": [], "scope_digest": "79a7984a9ec80a157c96dc8d28561159c642c15de3793837eff751fa7eac34a1", "scope_kind": "self_contained", "version": 2 } --> ## Exact-head review follow-up At `43fee85a2a47512e5da9efaebde7f38bc5aaed47`, all four current review findings were fixed and covered. - Release-baseline bootstrap and `--all` lanes now force the full Hypothesis profile, and native environment preparation receives that explicit profile identity. - The lifecycle lock is opened through a no-follow cache directory descriptor and checked as the same checkout-owned regular inode before it is truncated or written. - A transient tracked-file mutation observed during changed-path classification or native preparation now makes the final exact-head receipt ineligible, even if the file is restored before pytest begins. - Merge-train help and pending-status guidance now require a release-baseline `devtools verify --all` receipt; a narrow selection is explicitly described as insufficient. ## Review-fix verification - `direnv exec . devtools test tests/unit/devtools/test_verify.py::test_native_testmon_lifecycle_lock_refuses_symlink_without_touching_target tests/unit/devtools/test_verify.py::test_preparation_mutation_withholds_release_authority_after_restoration tests/unit/devtools/test_merge_boundary.py::test_train_status_requires_release_baseline_guidance tests/integration/devtools/test_native_testmon_lifecycle.py::test_release_native_runs_override_a_reduced_hypothesis_profile`: **5 passed in 19.50s**. The production regression invokes both automatic-bootstrap and `--all` routes with `HYPOTHESIS_PROFILE=verify`, while each fixture test asserts the full 100-example profile and the receipt grants release authority. - `direnv exec . devtools verify --quick`: all 10 quick gates passed in **25.78s** at the exact head above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Verification automatically prepares, repairs, and validates its test state. - Verification history now reports clearer outcomes, resource usage, cleanup, containment, and deadlines. - Release-baseline verification is required for full merge validation. - Nightly large-scale benchmarks now run as an explicit four-test campaign. - **Bug Fixes** - Improved handling of invalid, interrupted, or outdated verification state. - Safer behavior for linked worktrees and temporary files. - **Documentation** - Updated verification and contribution guidance for the streamlined workflow. - **Tests** - Expanded coverage for native verification, worktrees, recovery, deadlines, and benchmarks. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Codex <[email protected]>
Summary
Remove declarative artifact topology and its self-attesting verification surfaces. Preserve the single executor apply gate exposed by the retained MCP authority oracle, and make bound executor prevalidation and audit-continuity recovery safe for concurrent and nested use.
Problem
The artifact registry duplicated runtime relationships as manually curated descriptors and code-reference claims. It could attest to itself without proving a production route.
The retained MCP write-route oracle also exposed two real integration faults.
OperationExecutor.execute_boundrevalidated a typed plan but calledactuator.applydirectly. Routing the effect throughOperationExecutor.executeinitially used one mutable executor slot, so concurrent callers could overwrite each other's prevalidation authority. Separately, the new continuity write lock covered ordinary execution but not recovery; a concurrently constructed executor could reconcile and promote an in-flight writer's prepared command before that writer applied its domain effect.Solution
OperationExecutor.executeafter typed freshness and audit checks.ContextVarstack and restore it by token after success or failure. Concurrent threads and async contexts are isolated; nested execution is supported; the bypass is limited to the exact active actuator and plan identities.executecalls on stale-plan revalidation.The executor regression uses one production executor, real
TagAddActuatorroutes, real archive and audit SQLite tiers, and deterministic barrier ordering. It proves both receipts apply, both tags persist, and both audit runs complete with zero unknown effects. Restoring the former mutable executor slot makes it fail withMutationTransactionError.The continuity regression pauses a real source-WAL write after prepare, concurrently starts recovery through a second coordinator for the same archive, proves recovery cannot enter until the writer commits and promotes, and then verifies only the writer applied the command and both durable heads agree. Removing the recovery lock makes recovery steal the pending command and the original writer fail promotion.
Verification
direnv exec . devtools verify --quick: all 10 checks passed in 27.21s (20260814T033945Z-quick-2109307-916454c8).git diff --check: clean.Merge ordering
#3950 is merged and this PR is retargeted to
master; its effective 34-file delta is unchanged.Bead disposition