fix: address late-landing bot review findings across 11 merged PRs#1038
Merged
Conversation
Sweep of chatgpt-codex-connector review comments that landed after their respective PRs merged (#1032, #1037, #1035, #1030, #1031, #1028, #1025, #1024, #1022, #1020, #1019). Each fix includes a regression test verified to fail before the fix and pass after: - qpc-05/#1032: thread the real DataFrame plan-capture-error cause through to both the .plans.json companion (existing_errors=) and the main result row (plan_capture_error field); reset per-run capture-error state on ExpressionFamilyAdapter (qpc-15 w1-w3 implemented). - #1037: fix qpc-13's scope_limit path (_spark_helpers.py lives directly under benchbox/platforms/, not benchbox/platforms/dataframe/) and add the missing deps.needs: [qpc-05] to qpc-13 and qpc-15 planning YAMLs. - #1035: gate human-action-required.yaml's branch-rename admin action (w2) on the default-branch switch (w3) too, matching the source TODO's A-before-B sequencing. - #1030: release-cut's git commit now passes --no-verify, since the curation step already deleted .pre-commit-config.yaml and _project/scripts/ (the local hook entrypoints) from the working tree. - #1031: fix `python -m benchbox platform list` -> `benchbox platforms list` (plural, actual console script) across both DuckLake TODO planning files. - #1028: correct plan_changed against the full tree-walk fallback so a pure fingerprint-encoding-version bump (v1->v2) is never misreported as a changed plan; thread fingerprint_version through PlanMetadata/PlanHistory so version-boundary crossings are excluded from flapping/version-history diffs. - #1025: normalize a "Z"-suffixed timestamp to "+00:00" before datetime.fromisoformat(), which only accepts "Z" from Python 3.11 - the project's floor is 3.10. - #1024: recursively strip physical_operator.platform_metadata across the full operator tree for anonymized exports, not just the top-level raw_explain_output - many parsers copy raw EXPLAIN text into per-node metadata under platform-specific key names. - #1022: match each repeated query failure to its own error entry (FIFO per query_id) instead of always reusing the first; synthesize a standalone FAILED row for any error not actually consumed by a queries[] row, not just for query_ids absent from queries[] entirely. - #1020: document orphaned-commit-detector.yml as a third instance of the known "scheduled workflow absent from default branch" class in repo-admin-settings.md; use the latest PR (by number) as the branch-diff cutoff and skip the branch when that PR closed without merging, so an abandoned closed PR's commits aren't misreported as orphans. - #1019: move the qpc-01 planning YAML from TODO/ to DONE/ (already Completed). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKw2UhgHuzYPo3y5MfarD6
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de98320f9c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
17 tasks
joeharris76
added a commit
that referenced
this pull request
Jul 8, 2026
…1052) * fix: address late-landing bot review findings on PR #1038 and #1041 - #1038 (plan_metadata_utils.py): a brand-new query_id whose fingerprint_version differs from prev's default fell into the version-comparability-mismatch branch, which fell back to prev_metadata.plan_versions.get(query_id, 0) - writing an invalid version 0 (validate_plan_metadata rejects versions < 1). Bypass that branch entirely for query_ids absent from prev_metadata: there is no prior recording to be "not comparable" to, so a new query always starts at version 1. - #1038 (schema.py): plan_capture_error was added to ResultBuilder's in-memory query_results dict, but the actual JSON export goes through schema.py's _build_query_results_section, a separate serialization path that copies only specific fields onto the compact queries[] entry. Added plan_capture_error there too, so the real DataFrame capture-failure cause reaches the persisted bundle, not just the in-memory representation. - #1041 (validate-submission.yml): the "Reject non-maintainer vendor/ additions" step's OWNER/MEMBER/COLLABORATOR allowlist didn't account for the trusted same-repo auto/results-mirror-* PRs that sync-results-data-to-published.yml opens with secrets.GITHUB_TOKEN (authored by github-actions[bot]), so a maintainer's vendor bundle published through that path was blocked. Added the same two-signal trust check (head.repo.fork == false AND the mirror branch pattern) the "Validate bundles" step's manifest waiver already uses. Each fix has a regression test verified to fail before the fix and pass after. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKw2UhgHuzYPo3y5MfarD6 * fix: reconstruct plan_capture_error on result reload (#1052 review) The export fix alone was incomplete: _reconstruct_query_results() copied iter/stream/run_type/test_type from the compact queries[] entry but not plan_capture_error, so an export -> load -> re-export round trip silently dropped the real DataFrame capture-failure cause again even though it survived the first export. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKw2UhgHuzYPo3y5MfarD6 --------- Co-authored-by: Claude <noreply@anthropic.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.
Pull Request
Description
Consolidated fix for
chatgpt-codex-connectorreview comments that landed on 11 already-merged PRs after they merged (late-landing findings): #1032, #1037, #1035, #1030, #1031, #1028, #1025, #1024, #1022, #1020, #1019. Each source PR's review thread will be replied to and resolved citing this PR's commit..plans.jsoncompanion (existing_errors=) and the main result row (plan_capture_errorfield); reset per-run capture-error state onExpressionFamilyAdapterso it doesn't leak across runs on a reused adapter instance.scope_limitpath (_spark_helpers.pylives directly underbenchbox/platforms/, notbenchbox/platforms/dataframe/); add the missingdeps.needs: [qpc-05]to qpc-13 and qpc-15 planning YAMLs.human-action-required.yaml's branch-rename admin action (w2) on the default-branch switch (w3) too, matching the source TODO's A-before-B sequencing.release-cut'sgit commitnow passes--no-verify, since the curation step already deletes.pre-commit-config.yamland_project/scripts/(the local hook entrypoints) from the working tree before the commit runs.python -m benchbox platform list→uv run -- benchbox platforms list(plural, actual console script) across both DuckLake TODO planning files.plan_changedagainst the full tree-walk fallback result so a pure fingerprint-encoding-version bump (v1→v2) is never misreported as a changed plan; threadfingerprint_versionthroughPlanMetadata/PlanHistoryso a version-boundary crossing is excluded from flapping/version-history diffs instead of always reading as "changed"."Z"-suffixed timestamp to"+00:00"beforedatetime.fromisoformat(), which only accepts"Z"from Python 3.11 onward — the project's floor is 3.10.physical_operator.platform_metadataacross the full operator tree for anonymized exports, not just the top-levelraw_explain_output— many parsers copy raw EXPLAIN text (paths/hosts/usernames) into per-node metadata under platform-specific key names (details,extra_info).errors[]entry (FIFO per query_id) instead of always reusing the first; synthesize a standalone FAILED row for any error not actually consumed by aqueries[]row, not just for query_ids entirely absent fromqueries[].orphaned-commit-detector.ymlas a third instance of the known "scheduled workflow absent from default branch" class inrepo-admin-settings.md(the workflow already follows the saferef: develop-checkout shell pattern, so no code change is needed there — only the admin default-branch-switch action, already tracked); use the latest PR (by number) as the branch-diff cutoff indetect_orphaned_commits.pyand skip the branch when that latest PR closed without merging, so an abandoned closed PR's own commits aren't misreported as orphans.TODO/toDONE/(already markedstatus: Completed).Type of Change
Testing
Every fix has a dedicated regression test, verified to fail before the fix and pass after via
git stash:Full
tests/unit/ -m fastsuite (23,274 tests) also run: 3 pre-existing failures, all confirmed to reproduce identically on a cleandevelopcheckout (unrelated to this PR — sandbox running as root bypasses two filesystem-permission-error tests, and thezstdCLI binary is absent for a third).uv run --project _project/scripts -- python _project/scripts/todo_cli.py check-graphpasses (no dangling references / cycles) after the TODO YAML edits and the TODO→DONE move.ruff check/ruff format --check/ty checkall clean on every changed file.Public Contract Check
docs/reference/public-contracts.md, or this PR does not change public, beta-public, deprecated, generated, experimental, or repo-only contract surfaces.PlanMetadata.plan_fingerprint_versionsandQueryResultInput.plan_capture_errorare additive fields; existing.plans.json/main-file consumers are unaffected.Documentation
docs/operations/repo-admin-settings.md).Code Quality
Artifact Hygiene
Notes
Not CODEOWNERS-gated (no changes under
benchbox/core/query_plans/parsers/**,benchbox/core/expected_results/**, or the other soundness-critical paths) — squash auto-merge will be enabled.🤖 Generated with Claude Code
Generated by Claude Code