Skip to content

Replace constant configuration with code constants - #932

Draft
Sun Haoran (haoranpb) wants to merge 3 commits into
core/stack-08-copilot-clifrom
app/stack-01-config-constants
Draft

Sun Haoran (haoranpb) wants to merge 3 commits into
core/stack-08-copilot-clifrom
app/stack-01-config-constants

Conversation

@haoranpb

@haoranpb Sun Haoran (haoranpb) commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

Goal 2 (app boundaries), step 1, stacked directly on #930 (#931 is superseded). Design reference: #929, used as exploration.

Most of what runtime modules read from get_config() is constant, not configuration. This PR turns it into code, so only real deployment settings stay in Config (repository paths, judge models, GitHub environment flags):

  • File-name conventions become constants in their owning modules (dataset entries, results, instruction operations, plugins); the unused trajectory pattern is dropped.
  • Timeouts become parameter defaults with unchanged values.
  • Package-relative paths move to bcbench.paths.

Eight runtime modules no longer read configuration at import. No behaviour change.

@haoranpb
Sun Haoran (haoranpb) force-pushed the app/stack-01-config-constants branch from f120583 to ba8cf63 Compare October 6, 2026 11:24
@haoranpb
Sun Haoran (haoranpb) changed the base branch from core/stack-09-copilot-session to core/stack-08-copilot-cli October 6, 2026 11:25
@haoranpb
Sun Haoran (haoranpb) added this pull request to stack #960 October 8, 2026 12:17
@github-code-quality

github-code-quality Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: Python

Python / code-coverage/pytest

The overall line coverage in commit 678c40b in the app/stack-01-config-... branch is 87%. The line coverage in commit 92af447 in the core/stack-08-copilo... branch is 86%.

Show a line coverage summary of the most impacted files.
File core/stack-08-copilo... 92af447 app/stack-01-config-... 678c40b +/-
src/bcbench/config.py 98% 97% -1%
src/bcbench/types.py 92% 92% 0%
src/bcbench/age...opilot/agent.py 73% 100% +27%
packages/bcbenc...ilot/metrics.py 0% 100% +100%
packages/bcbenc...opilot/agent.py 0% 100% +100%
packages/bcbenc...opilot/types.py 0% 100% +100%
packages/bcbenc...gent/version.py 0% 100% +100%
packages/bcbenc...gent/metrics.py 0% 100% +100%
packages/bcbenc...lot/__init__.py 0% 100% +100%
src/bcbench/paths.py 0% 100% +100%

Updated October 08, 2026 17:52 UTC

Sun Haoran (haoranpb) and others added 2 commits October 8, 2026 15:01
Config held values that never vary per run; only deployment settings
remain (repository paths, judge models, GitHub environment flags).

- File-name conventions become constants in the module that owns them:
  INSTANCE_ID_PATTERN and PROBLEM_STATEMENT_README (dataset entries),
  RESULT_FILE_SUFFIX (results), INSTRUCTION_SOURCE_FILE and
  PROBLEM_STATEMENT_DEST_DIR (instruction operations), PLUGIN_MANIFEST
  (plugins). The unused trajectory pattern is dropped, and patch
  separation defaults to the "test"/"tests" identifiers.
- Timeouts become parameter defaults with the same values: agent runs
  (60 min), bcal (25 min), filepath identification and data-query
  execution (15 min).
- Package-relative paths move to bcbench.paths (AGENT_SHARE_DIR,
  SHARED_CONFIG_FILE) instead of being derived from the git root.

Eight runtime modules no longer read get_config() at import time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@haoranpb
Sun Haoran (haoranpb) force-pushed the app/stack-01-config-constants branch from e285654 to 6a12884 Compare October 8, 2026 13:13
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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