Skip to content

Implementation Plan: T5-P3-A3-WP3 Produce Merge-Blocking CI Tests for Codex Deterministic Conformance#4149

Merged
Trecek merged 4 commits into
developfrom
t5-p3-a3-wp3-produce-merge-blocking-ci-tests-no-live-cli-req/4011-2
Jun 29, 2026
Merged

Implementation Plan: T5-P3-A3-WP3 Produce Merge-Blocking CI Tests for Codex Deterministic Conformance#4149
Trecek merged 4 commits into
developfrom
t5-p3-a3-wp3-produce-merge-blocking-ci-tests-no-live-cli-req/4011-2

Conversation

@Trecek

@Trecek Trecek commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add tests/execution/backends/test_codex_deterministic_conformance.py with four test classes that seal the CodexEventType/CodexItemType vocabulary, hook event formats, and config.toml schema template against undetected drift. Register --update-fixtures in the existing pytest_addoption() in tests/conftest.py and expose it as a pytest fixture. All tests are pure Python assertions against committed JSON fixtures — no live CLI, no subprocess, no network I/O.

Closes #4011

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260628-181308-999735/.autoskillit/temp/make-plan/t5_p3_a3_wp3_deterministic_conformance_plan_2026-06-28_181500.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan* opus[1m] 1 56 16.0k 1.4M 103.4k 53 85.0k 12m 28s
verify* sonnet 1 92 12.2k 513.0k 58.1k 28 39.6k 6m 32s
implement* MiniMax-M3 1 70.2k 8.8k 1.3M 0 62 0 3m 19s
fix* sonnet 1 150 8.5k 898.8k 66.6k 45 48.0k 8m 21s
audit_impl* sonnet 1 52 18.9k 221.1k 52.8k 16 54.6k 8m 27s
prepare_pr* MiniMax-M3 1 45.2k 2.6k 202.4k 0 14 0 43s
compose_pr* MiniMax-M3 1 36.5k 1.6k 104.3k 0 10 0 33s
review_pr* sonnet 3 444 119.3k 3.0M 100.4k 134 227.2k 25m 45s
resolve_review* sonnet 2 3.3k 36.1k 3.6M 89.7k 136 135.4k 19m 52s
Total 156.0k 224.2k 11.3M 103.4k 589.9k 1h 26m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 259 5210.4 0.0 34.1
fix 140 6420.3 343.2 60.9
audit_impl 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 19 188851.2 7127.1 1900.9
Total 418 27071.4 1411.1 536.2

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
opus[1m] 1 56 16.0k 1.4M 85.0k 12m 28s
sonnet 5 4.0k 195.0k 8.2M 504.9k 1h 8m
MiniMax-M3 3 151.9k 13.1k 1.7M 0 4m 35s

Trecek and others added 3 commits June 28, 2026 18:36
Seal the CodexEventType/CodexItemType vocabulary, hook event formats, and
config.toml schema template against undetected drift. All tests are pure
Python assertions against committed JSON fixtures — no live CLI, no
subprocess, no network I/O.

- Add --update-fixtures to pytest_addoption in tests/conftest.py
- Add update_fixtures fixture in tests/execution/backends/conftest.py
- Create test_codex_deterministic_conformance.py with 4 test classes:
  - TestCodexEventTypeVocabulary (parametrized + sealed meta-test)
  - TestCodexItemTypeVocabulary (parametrized + sealed meta-test)
  - TestCodexHookEventFormatFixture (hash + structural comparison)
  - TestCodexConfigTomlSchemaTemplate (key coverage + constant pinning)
- Register new test file in tests/execution/AGENTS.md backends/ table

Run pytest --update-fixtures -n0 to regenerate fixtures after a
deliberate vocabulary or format change.
…ce tests

The test constructs fixture filenames using member.value (e.g. "thread.started")
producing event_thread.started.json, but existing fixtures used underscores
(event_thread_started.json). Create dotted-name copies so all 9 non-UNKNOWN
CodexEventType members resolve their expected fixture paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AutoSkillit PR Review — Verdict: approved_with_comments

Comment thread tests/execution/backends/test_codex_deterministic_conformance.py
Comment thread tests/execution/backends/test_codex_deterministic_conformance.py
Comment thread tests/execution/backends/test_codex_deterministic_conformance.py
Comment thread tests/execution/backends/test_codex_deterministic_conformance.py
"tests/execution/backends/test_codex_deterministic_conformance.py"
)

def test_update_fixtures_writes_snapshot(

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[warning] tests: test_update_fixtures_writes_snapshot skips in normal CI (--update-fixtures not set), so it contributes zero assertions on every standard run. The post-write assertions (L190-L191) only verify json.dumps/json.loads round-trip fidelity — they cannot fail independently of the write. Either exclude via a dedicated mark filtered in CI, or remove the round-trip assertions as they test stdlib behavior.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid observation — flagged for design decision. The post-write assertions in test_update_fixtures_writes_snapshot verify only write-integrity (file is written, parseable, and round-trips the in-memory values) — they cannot detect a logic error in what was computed before writing. Drift detection is covered by test_hook_snapshot_matches_live_registry which runs unconditionally. Whether the write-integrity check merits dedicated CI exclusion or assertion removal is a design question for human review.

Comment thread tests/execution/backends/test_codex_deterministic_conformance.py
Comment thread tests/execution/backends/test_codex_deterministic_conformance.py
Comment thread tests/execution/backends/test_codex_deterministic_conformance.py


@pytest.fixture
def update_fixtures(request: pytest.FixtureRequest) -> bool:

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[warning] cohesion: The update_fixtures fixture is defined only in tests/execution/backends/conftest.py but --update-fixtures CLI option is registered in the top-level tests/conftest.py. If future tests outside tests/execution/backends/ need this fixture, it will be unavailable. Consider co-locating the fixture at the top-level conftest.py alongside the option registration.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Valid observation — flagged for design decision. The --update-fixtures CLI option is registered in the top-level tests/conftest.py per pytest requirements, while the update_fixtures fixture wrapping it is defined only in tests/execution/backends/conftest.py — intentional co-location with its sole consumer. Moving the fixture to the top-level conftest is a valid future-proofing step if the option is expected to become reusable, but requires a human decision on whether this is expected to remain backends-only.

@Trecek Trecek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AutoSkillit review: warning-only findings detected. See inline comments — no blocking changes required.

…template regen test

Post-write check in test_update_fixtures_regenerates_template verified only
tool_output_token_limit but omitted model_auto_compact_token_limit, creating
an asymmetric check against the two-constant template it just wrote.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Trecek Trecek added this pull request to the merge queue Jun 29, 2026
Merged via the queue into develop with commit fe44caf Jun 29, 2026
3 checks passed
@Trecek Trecek deleted the t5-p3-a3-wp3-produce-merge-blocking-ci-tests-no-live-cli-req/4011-2 branch June 29, 2026 03:04
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