Skip to content

Deduplicate provider feasibility spike utilities - #815

Merged
morluto merged 2 commits into
mainfrom
agent/extract-provider-spike-utils
Aug 8, 2026
Merged

Deduplicate provider feasibility spike utilities#815
morluto merged 2 commits into
mainfrom
agent/extract-provider-spike-utils

Conversation

@morluto

@morluto morluto commented Aug 7, 2026

Copy link
Copy Markdown
Owner

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.tooling package.

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 no spike.py source pin.

Provider-specific error handling and _sha256_file behavior 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.py
  • uv run --locked python tools/check_benchmark_static.py
  • make 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.

@morluto
morluto marked this pull request as ready for review August 8, 2026 07:06
@cursor

cursor Bot commented Aug 8, 2026

Copy link
Copy Markdown

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

Comment on lines +20 to +23
from benchmarks.tooling.spike_utils import (
canonical_json,
default_runner,
sha256_bytes,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@morluto
morluto merged commit a02977d into main Aug 8, 2026
59 of 72 checks passed
@morluto
morluto deleted the agent/extract-provider-spike-utils branch August 8, 2026 07:28
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