Deduplicate provider feasibility spike utilities - #815
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05b3fa6e3e
ℹ️ 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".
| COPY __init__.py /opt/benchmarks/__init__.py | ||
| COPY tooling/__init__.py /opt/benchmarks/tooling/__init__.py | ||
| COPY tooling/command_runner.py /opt/benchmarks/tooling/command_runner.py | ||
| COPY tooling/spike_utils.py /opt/benchmarks/tooling/spike_utils.py |
There was a problem hiding this comment.
Whitelist the helper in the Docker build context
All five provider Compose files build with benchmarks/ as their context, whose .dockerignore starts with ** and re-includes only tooling/__init__.py and tooling/command_runner.py. Because tooling/spike_utils.py is still excluded, this new COPY has no source in the transmitted context and every affected provider image build fails before its Oracle can run; add the helper to the .dockerignore allowlist.
Useful? React with 👍 / 👎.
| from benchmarks.tooling.spike_utils import ( | ||
| canonical_json, | ||
| default_runner, | ||
| sha256_bytes, |
There was a problem hiding this comment.
Bind the extracted helper to the provider pins
For cddlib, GUDHI, and Regina, adapter_source_sha256 still validates only spike.py, even though canonical serialization, hashing, and process-launch behavior now come from this separate module. If spike_utils.py changes while spike.py and its pin remain unchanged, the adapter accepts the frozen source digest and reports it despite executing different code; include the helper's digest in each applicable pin and validate it before execution, or keep the pinned behavior within the hashed adapter.
AGENTS.md reference: AGENTS.md:L66-L67
Useful? React with 👍 / 👎.
Summary
Addresses the actionable part of #717.
Extract the identical canonical-JSON, SHA-256, and command-runner helpers used by the cddlib, CGAL, GUDHI, nauty, and Regina provider spikes. Each provider container now copies the shared module into the existing
benchmarks.toolingpackage.The cddlib, GUDHI, and Regina adapters digest
spike.py, so their source pins and every task-owned consumer (Oracle input, public schema, solution, and verifier fixtures) are refreshed in the same change. CGAL pins a separate C++ adapter and nauty has nospike.pysource pin.Provider-specific error handling and
_sha256_filebehavior remain local. Lean REPL and all clean-room Harbor verifier files are intentionally untouched: task-local verifier code is required by the separate-verifier build context and independence boundary.Validation
make test-unit TESTS=tests/unit/tooling/test_spike_utils.pyuv run --locked python tools/check_benchmark_static.pymake harbor-check-task DATASET=provider-feasibility-v1 TASKS="cddlib gudhi regina"CI runs the full host-validation matrix and exact provider Oracles for this shared-tooling/task-image change.