Repository navigation
fix(devtools): close 15 Codex P1 findings in gates and receipts - #5836
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Occurrences are numbered in source order and deduped per call; the census observes runtime DDL in the storage layer and in every module that writes an archive table, so private parser spill stores stay out of archive state; a conditional with no readable branch is not a statement; private scratch relations may be declared outside archive_tiers/write.py. The declaration gains each separate statement row and the delegation scratch graph. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg
Texts of one call are alternatives; statements inside one text are sequential, so a script that rewrites a table twice needs two declarations. The regression module lives in the storage layer the census scans. 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
Fixes the 15 confirmed Codex P1 findings tracked in polylogue-5gj4u, all in devtools: the xdist worker cap, the durable-write census, the mypy cache seed, the schema-manifest gate, and verification receipts. The previous owner's uncommitted lane state was carried onto current master; this PR finishes the census work, which had left
devtools gate layeringat 158 violations.Problem
Each row is a Codex review thread confirmed against master 64a9bd0 by triage run
r3-devtools. The reproductions are in the bead and in each linked thread.Solution
resize_worker_argumentreads every-n/--numprocessesbefore--, resolvesauto/logicalthrough xdist's own hook, writes the capped count into every occurrence, and keeps--pdbat 0tests/unit/devtools/test_corpus_worker_memory_bound.py,tests/unit/devtools/test_run_tests.pytests/unit/devtools/test_durable_write_census_regressions.py?target. A conditional with no readable branch stays "not a string" instead of a hole, so the caller-supplied-SQL helper census keeps seeing itpolylogue/storage/**and in any module that writes a canonical archive table. Private stores that never name an archive table (parser spill databases, the browser-capture registry) stay outside archive state; the delegation scratch graph is declareddisposable_scratch, which any module may now declare with a reasonCREATEin a statement text is classifiedPRAGMA foreign_key_liston the same table and connection)filesas absolute paths rooted at this checkout, so a sibling's cache entry never matches by path and mypy re-hashes the sourcetests/unit/devtools/test_mypy_daemon_lifetime.py_merge_basenever falls back to HEAD. On the default branch it uses the first parent; with no comparison history it refuses. The GHA lint job fetches full history, and the CircleCI quick gate fetches mastertests/unit/devtools/test_verify_schema_manifest.pydurable_migration_claimsadmission per durable tier; shipped sidecars are immutable like their SQLworkload_specbefore admission; a refusal or interruption withholds steps from execution, not from the plan. Thefinalizationplaceholder is removedtests/unit/devtools/test_verify.pyworktree-sha256:<content>, an unidentified tree isNone, and a tree that moved during the run has no build idworkload_receiptpersisted in run.jsonconcurrencyis the widest planned fan-out (gate pool or capped xdist width)runningunder the same run idtests/unit/devtools/test_verify_runs.pyNo derived-identity closure member changes (devtools, tests, CI, and
docs/plans/durable-write-census.yamlonly).Verification
All runs through AgentCTL declared operations at head
23f57e45e0(rebased on master5d56c3a26f):agentctl job start --workspace /realm/worktrees/polylogue-5gj4u polylogue verify_quick(job 3393):verify: PASSED exit=0. Pre-push quick verify:verify: PASSED exit=0.agentctl job start --workspace … polylogue pytest_focused -- -n 4 <60 affected test files>(job 3392): 1156 passed, 14 failed. All 14 are inherited or environment-dependent:5d56c3a26fin a detached worktree (pytest_focused -- <ids> --on-default-branch, job 3391):test_daemon_resilience::test_concurrent_access_safety,test_web_reader::test_archive_filter_kwargs_cover_every_storage_lowerable_spec_field, three intest_cli_acceptance,test_pytest_suite_cost_plugin::test_post_gc_rss_is_read_before_heap_census_allocations,test_verification_evidence_lane::test_reconciled_abandoned_run_joins_the_durable_lane,test_verification_result::test_projection_uses_the_finalized_step_and_aggregate_counts,test_verification_terminal_receipts::test_queued_interruption_keeps_start_time_worktree_provenance,test_verify::test_zero_exit_without_a_report_is_a_failed_pytest_step,test_retention_probe::test_worker_output_is_qualified_and_retention_ranking_is_separate.test_retention_probecases fail only inside the mixed-n 4run. The file alone passes them on this branch (job 3398) and on master (job 3397), with the same single inherited failure.devtools gate layering:gate_passed(0 semantic violations; 158 before this PR's census work).Self-review
Checklists re-read:
docs/review/codex-review-guide.md,devtools/AGENTS.mdreview rules, and the orchestrate worker contract. Three passes; findings from passes 1 and 2 were fixed here, and pass 3 found nothing new.Pass 1 findings (fixed): (a) The census WIP left the declaration unchanged:
devtools gate layeringreported 158 violations. (b) Scanning runtime DDL in every module treated about 60 private spill tables (parser scratch databases, the browser-capture registry, schema journals) as archive state. (c) Occurrences were numbered inast.walkorder, so nesting an unrelated statement renumbered sites and could swap their declarations. (d) TheIfExpchange turned a conditional with no string branch into a hole, which hid the_canonical_schema_inventory_for_ddlcaller-supplied-SQL helper. (e)_dynamic_table_targetskept an unusedvalues. (f)ast.AST.linenotyping.Pass 2 findings (fixed): (g) Per-call dedupe collapsed two rewrites inside one
executescript(a red regression test). (h) The regression module sat outside the scanned layer._is_archive_storage_moduleor_writes_archive_table, used by bothcensus_packageandverify_layering._package_passthroughobserve_runtime_ddl(thereads_runtime_ddlpre-filter is deleted from both). The worker-width parser_worker_requestsis the single reader for the slot;run_testsstill expands clustered flags first (test_an_explicit_automatic_width_starts_pytest_at_the_capped_count).RuntimeError, whichmain()turns into FAIL/exit 1.durable_migration_claimserrors become violations, not tracebacks._writes_archive_tableis one extra pass over each module's calls; the census cost stays linear in module size.status=interruptedwith the declared plan and only the steps it finished.runningunder the same run id.?target that fails the gate rather than being skipped.test_occurrences_follow_source_order_across_nesting). Workload build identity is the commit only for a clean tree, otherwise the content digest.resize_worker_argumentrewrites only width values and keeps every other argument in place.-n 0stays no xdist;-n auto --pdbbecomes 0;-n64after--is a path, not a width.WriteSite.keyand declaration keys change together (load_declarationnumbers rows the same way);reads_runtime_ddlhas no remaining caller (grep 0);iter_site_payloadspublishesoccurrence. CI configs fetch the comparison history the gate now requires._Rundouble intest_verify_gate_independence.pygaineddeclare_workload/recorded_git_dirty;test_verifier_common_finalizer_adds_receipt_on_early_failurewas removed with the fallback it tested.Generic list:
census_package/collect_violations,resize_worker_argument,devtools.verify._mainhelpers,verify_schema_manifest.main, the real mypy binary for F029).grep -rn "reads_runtime_ddl\|_is_archive_tier_runtime_module" devtools testsfinds 0 matches.finalizationplaceholder and theworkload_receipt=Nonefallback.Residuals
polylogue/storage/that writes no canonical archive table, yet creates and rewrites a table on an archive connection it was handed, is still unseen. The declared scope is the storage layer plus archive writers.filestargets; a config usingpackages/moduleskeeps mypy's stat-trust behaviour (Polylogue usesfiles).-o addopts=-n64,-c other.ini) is still invisible to the resizer.🤖 Generated with Claude Code
https://claude.ai/code/session_015pdKaZWyGe6Ngvsz468dzg