Repository navigation
test: realign tests with contracts that landed PRs changed - #5813
Merged
Merged
Conversation
Each of these tests failed on master because a merged PR changed the contract it encodes; production behavior is unchanged here. - lineage validation: the hand-built index lacked messages.fields_digest and the derived-identity stamp every reader now requires (SchemaSkew). - facade contracts: record_context_ledger (#5722) and get_session_summaries were in no contract set; facet buckets now deduplicate search hits in the scope walk (#5703). - preamble: the precompact path awaits record_context_ledger (#5722). - manual contract: read's view is Optional[Literal], so the vocabulary is read through the union. - write effects: insight invalidation rides the admitted transaction (#5727); the test now proves commit/rollback with the caller. - tag overlay: tag writes that change a row drop the search cache (#5727). - status: sinex status resolves the runtime file set, and a non-built-in daemon URL is read over HTTP /api/status (#5722). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
Realigns 11 tests that fail on master. Each encodes a contract that a merged PR changed on purpose. Production code is unchanged.
Problem
These tests failed at master 1beb2e5 (baseline agentctl job 2441,
devtools test --on-default-branch). Beads: polylogue-cp3z5 (lineage validation) and polylogue-bn8gg (facaderecord_context_ledger). The other items are in polylogue-6bhuy, which also lists items owned by sibling PRs.tests/unit/devtools/test_lineage_validation.py(all 21)messages.fields_digestand the derived schema identity stamp. Every reader refuses an unstamped derived tier asSchemaSkew("expected , found None").test_facade_contracts.py::test_no_undiscovered_async_methodsrecord_context_ledger(#5722) andget_session_summariesare in no contract set.test_facade_contracts.py::test_archive_facet_buckets_count_unique_sessions_for_duplicate_hitstest_preamble.py::test_precompact_uses_scheduler_and_records_real_boundary_contextrecord_context_ledger(#5722). The mock was a plainMagicMockattribute, and the other test in the file set it twice.test_manual_contract.py::test_published_examples_use_live_operation_vocabularies_and_preconditionsread'sviewis nowLiteral[...] | None.typing.get_argson the union yields the Literal andNoneType, not the members.test_write_effects.py::test_deferred_insight_invalidation_follows_a_repointed_indextest_mutation_actuators.py::...::test_production_tag_and_metadata_writes_use_user_overlay_policytests/unit/cli/test_status.py::...::test_sinex_status_reads_the_active_archive_file_setresolve_runtime_config().tests/unit/cli/commands/test_status.py::...::test_configured_override_url_is_not_refusedGET /api/status.Solution
Each test now exercises the current contract and keeps its anti-vacuity condition:
fields_digestand stamps the current identity with the productionstamp_derived_schema_identity.get_session_summariesgains coverage intest_archive_tiers_api_reads_native_sessions: requested ids key the result, and an unresolved id is omitted. The facet test drives two hits for one session through the search scope."messages"is in it, so an empty read cannot pass./api/statuswas requested.Verification
agentctl job start polylogue pytest_focused --workspace <wt> -- tests/unit/devtools/test_lineage_validation.py tests/unit/api/test_facade_contracts.py tests/unit/context/test_preamble.py tests/unit/agent_integration/test_manual_contract.py tests/unit/archive/test_write_effects.py tests/unit/operations/test_mutation_actuators.py tests/unit/cli/test_status.py tests/unit/cli/commands/test_status.py: job 2632,devtools test: PASSED exit=0, 582 passed. Five tests passed only on rerun. Each failed first withDaemonWriterOwnerLoopStopped ... daemon.operation_journals.startupor a 5 s bridgeTimeoutErrorin the test daemon stack; that race is fixed in fix(reset): confirm databases, not their transient WAL sidecars #5810.agentctl job start polylogue verify_quick --workspace <wt>: job 2633, succeeded.Self-review
stamp_derived_schema_identity,_invalidate_insights_effecton a real connection,_status_operation_resultagainst a real HTTP listener,ArchiveStoretag writes). None asserts a mock's own behaviour.Residuals
None known for these tests. The daemon-stack startup race behind the five reruns is addressed in #5810.
🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg