fix: quarantine burndown round 2 — empty the test-quarantine ledger (36 → 0)#142
Merged
Conversation
…36 -> 0) Fixes every remaining ledgered failure so the quarantine ledger is now empty: - Contract 06/07/08 (transport packet): add public constellation-node-sdk git dependency to requirements.txt so packet-protocol contract tests run. - Contract 16/18: allow real engine dirs (arbitration, outcomes, auth, diagnostics, hoprag, models) in the top-level dir contract; add L9_META headers to 15 engine modules that lacked them. - Gap-1 content_hash drift: extract shared _compute_content_hash helper in engine/contract_enforcement.py so builders and verifier hash the same canonical field set (tenant_id included, tenant_context excluded). - T5-03 / Contract 02 chassis bridge: engine/security/P2_9_llm_schemas.py no longer imports chassis directly; FeatureNotEnabled is re-exported through engine/handlers.py (the sanctioned chassis bridge). - T601/T603/T605 resilience + T103 trust boundary: rewrite tests against the W4-01 EngineState singleton instead of removed module-level globals. - Compliance security tests: use real DomainPackLoader(config_path=...) and ComplianceEngine.check_match_request API. - test_outcomes_success: pin feedbackloop mock config so MagicMock chains never leak into sanitize_label. - Wave6 LLM test: hermetic (clears OPENAI_API_KEY, resets backend); FeatureNotEnabled message now self-describing (prefixed with feature name). - Order-dependent asyncio flakes: replace deprecated asyncio.get_event_loop().run_until_complete() with asyncio.run() in test_algorithmic_upgrades, test_pareto_wiring, test_chassis_app. - mypy: silence false-positive unreachable warnings in packet_bridge defensive payload guards. Local verification: 1607 passed (unit/contract/invariant/security), 53 passed (integration+performance vs Neo4j 5.18-enterprise), 0 failed. ruff check/format clean, mypy clean, terminology guard clean.
|
📋 Best Practices for Large Changes
✅ This PR passes the blocking limit but is larger than recommended. |
|
| # T5-03: handlers.py is the sanctioned chassis bridge. Re-export chassis | ||
| # error types here so other engine modules can use them without importing | ||
| # chassis directly. | ||
| from chassis.errors import FeatureNotEnabled # noqa: F401 |
cryptoxdog
added a commit
that referenced
this pull request
Jul 23, 2026
type=sha,prefix={{branch}}- resolved {{branch}} to an empty string on
pull_request events (ref is refs/pull/N/merge, not a branch ref),
producing the invalid tag ":-<sha>" and failing "Build & Push
Container" on every PR (confirmed on #141 and #142 build logs:
"invalid tag ...:-bb7e3af: invalid reference format"). A static
sha- prefix works identically on push and pull_request events.
Co-authored-by: Cursor <cursoragent@cursor.com>
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.



Summary
Quarantine burndown, round 2. This PR fixes all 36 remaining ledgered test failures and empties the quarantine ledger (
.l9/baselines/test-quarantine.yml: 36 → 0 entries). Combined with #140 (61 → 36), the repository now has zero known test debt.Root-cause groups and fixes
constellation-node-sdknever installed, packet-protocol contract tests could not import itrequirements.txt; tests now exerciseTransportPacketfor realarbitration,outcomes,auth,diagnostics,hoprag,models); 15 engine modules lackedL9_METAheadersL9_METAheaders to all 15 modules{entity_type, batch}/{proposed_fields, provenance}while the verifier hashed the full canonical set includingtenant_id— every packet failed verification_compute_content_hashhelper inengine/contract_enforcement.py; builders and verifier now hash the identical canonical field setengine/security/P2_9_llm_schemas.pyimportedchassis.errorsdirectly, violating the single-bridge contractFeatureNotEnabledis now re-exported throughengine/handlers.py(the sanctioned bridge); the security module imports it from there_graph_driver,_loader_lock) removed by the W4-01EngineStaterefactorEngineStatesingleton (get_state()), with proper snapshot/restore fixturesEngineStateDomainPackLoader(domains_dir=...)andComplianceEngine.evaluate(...)DomainPackLoader(config_path=...),check_match_request(tenant=, query=, match_direction=)MagicMockchain leaked a non-stringoutcome_node_labelintosanitize_labelfeedbackloopmock config to concrete values in the spec factoryOPENAI_API_KEYwas set in the environment; error message also didn't contain "LLM"FeatureNotEnabledmessage is now prefixed with the feature nameasyncio.get_event_loop().run_until_complete()raisesRuntimeErroronce any earlier test closes the loop (Python 3.12)asyncio.run()intest_algorithmic_upgrades,test_pareto_wiring,test_chassis_appAlso fixed while in the area: two mypy
unreachablefalse positives inengine/packet_bridge.pydefensive payload guards (explicitAnyannotation with rationale).Verification
ruff check/ruff format --check: clean on all touched filesmypy engine/(CI invocation):Success: no issues found in 131 source filesprint(,Optional[,List[,Dict[,Tuple[,Set[,log.,Substrate): no matches in changed filesRatchet impact
The ledger may only shrink; this PR shrinks it to zero. No entries were removed for tests that still fail — every removed entry was verified passing both individually and in full-suite order.
Size note
909 changed lines across 29 files — under the 1,000-line review gate. The change is one atomic unit: ledger pruning is only valid together with the fixes that make the ledgered tests pass.