Skip to content

test: realign tests that encode contracts later PRs changed - #5768

Merged
Sinity merged 1 commit into
masterfrom
claude/realign-stale-tests
Sep 28, 2026
Merged

Sinity merged 1 commit into
masterfrom
claude/realign-stale-tests

Conversation

@Sinity

@Sinity Sinity commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Summary

Realigns the master tests whose failures are stale tests rather than code defects: 16 test ids, 12 from the coordinator's list plus the pinned read-only store test. Each one asserted a contract that a later PR changed on purpose. The fixes below are grouped by the PR that broke them.

Problem and fix, by breaking PR

Breaking PR Tests Why they fail Fix
#5564 (0723a95) test_pinned_read_only_store_blocks_all_archive_tier_mutations, test_convergence_one_shot_readers_cannot_mutate The read profile's authorizer rejects writes at prepare time with DatabaseError: not authorized, before SQLite's own OperationalError: readonly is reached. Expect sqlite3.DatabaseError matching not authorized|readonly. The existing checks that nothing changed stay.
#5550 (da5346d) Seven test_store_ops tag tests Facade writes now belong to the daemon: add_tag and remove_tag raise FacadeDaemonRequiredError when no daemon is running. The three parametrized tests run the resident writer on the archive's own socket, through a new tests/infra/daemon_operations.daemon_serving_archive; the MCP helper now reuses it. The Hypothesis tag law calls ArchiveStore.add_user_tags, the primitive the daemon's actuator applies. It clears open_connection's per-path cache between examples, because otherwise each new example archive keeps about 11 descriptors and trips the fd-leak guard.
#5700 (f2562c3) test_daemon_required_envelope_preserves_resolved_archive_root #5700 made a daemon-absent machine refusal exit with FAILED_READ_EXIT_CODE (1). The test, added in #5722, asserted 2. Assert FAILED_READ_EXIT_CODE.
#5727 (ee567d0) test_recent_attempts_report_the_file_count_not_the_session_count Read-only opens now check derived schema identity, so a hand-built ops.db is refused and the probe returns no attempts. Seed a real ops tier with initialize_archive_database and a valid status.
#5727 test_compare_reports_archive_derived_readiness_deltas compare is now not ok when either side's convergence-debt ledger is unavailable, and a missing ops.db counts as unavailable. Initialize ops.db.
#5727 test_unavailable_debt_is_rendered_unknown_and_cli_fails_closed The test was added in #5727 and never passed: "0 failed" not in output also matched the attempt-count line (0 running, 0 failed), which has existed since #4010. Check only the convergence-debt line.
#5551 (aa19052) test_daemon_workload_probe_does_not_claim_derived_ready_on_schema_mismatch Under the fresh format every tier starts at user_version = 1, so writing 1 no longer produces a mismatch. Set user_version = 2.

Not in this PR:

Verification

  • devtools test tests/unit/security/test_excision_carrier_reach.py tests/unit/security/test_excision.py tests/unit/storage/test_archive_tiers_archive.py tests/unit/daemon/test_maintenance_read_profiles.py tests/unit/cli/test_machine_main.py tests/unit/sources/test_refused_state_is_reported.py tests/unit/operations/test_daemon_workload_probe.py tests/unit/storage/test_store_ops.py tests/unit/mcp/test_mcp_writer_boundary.py: PASSED exit=0 (run with fix(security): declare raw_existence_changes once, as excised #5767's change applied)

🤖 Generated with Claude Code

https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg

- #5564: profiled readers refuse writes in their authorizer
  ("not authorized", a DatabaseError) before SQLite's read-only check.
- #5550: facade tag writes are daemon-owned; the tag tests run the
  resident writer on the archive's socket (new daemon_serving_archive
  helper, also used by the MCP helper). The Hypothesis tag law drives the
  add_user_tags primitive and clears open_connection's per-path cache
  between examples.
- #5700: a daemon-absent refusal exits with FAILED_READ_EXIT_CODE.
- #5727: read-only opens verify derived schema identity, so the refused
  attempts test seeds a real ops tier; compare is not ok when a debt
  ledger is unavailable, so the compare test creates ops.db; the
  unavailable-debt test now checks only the debt line.
- #5551: every tier starts at user_version 1, so the schema-mismatch
  probe test sets 2.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
@Sinity
Sinity enabled auto-merge (squash) September 28, 2026 23:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T23:30:56.476714Z 6d24bc5 PR opened
🔒 Security Review ✅ Completed 2026-09-28T23:31:31.705727Z 6d24bc5 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity
Sinity merged commit f4475c4 into master Sep 28, 2026
3 of 4 checks passed
@Sinity
Sinity deleted the claude/realign-stale-tests branch September 28, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant