Skip to content

Commit 4475eb0

Browse files
committed
chore: remove hardcoded repo paths and add community docs
1 parent 036e358 commit 4475eb0

13 files changed

+105
-18
lines changed

CODE_OF_CONDUCT.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Code of Conduct
2+
3+
## Our Standards
4+
5+
Contributors are expected to be respectful, constructive, and professional in issues, pull requests, and reviews.
6+
7+
Unacceptable behavior includes:
8+
9+
- Harassment, discrimination, or personal attacks
10+
- Trolling, insulting, or derogatory comments
11+
- Publishing private information without permission
12+
- Disruptive or bad-faith participation
13+
14+
## Enforcement
15+
16+
Project maintainers may remove, edit, or reject comments and contributions that violate this code of conduct.
17+
18+
## Reporting
19+
20+
If you experience or witness unacceptable behavior, report it privately to the maintainers through GitHub (do not open a public issue for conduct reports).

CONTRIBUTING.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Contributing
2+
3+
Thanks for contributing to CodeContextBench.
4+
5+
## Scope
6+
7+
This repository contains benchmark tasks, evaluation configs, and analysis tooling. Changes should preserve reproducibility and avoid breaking existing task definitions unless the change is intentional and documented.
8+
9+
## Before Opening a PR
10+
11+
Run the repo health gate from the repository root:
12+
13+
```bash
14+
python3 scripts/repo_health.py
15+
```
16+
17+
For docs/config-only changes, `--quick` is usually sufficient during iteration:
18+
19+
```bash
20+
python3 scripts/repo_health.py --quick
21+
```
22+
23+
## Change Guidelines
24+
25+
- Keep changes scoped and easy to review.
26+
- Update documentation when behavior, workflows, or file locations change.
27+
- Avoid committing local run artifacts (`runs/`, `results/`, `eval_reports/`, logs).
28+
- Do not commit credentials, tokens, or private keys.
29+
30+
## Benchmark / Task Changes
31+
32+
- Validate tasks before launching runs: `python3 scripts/validate_tasks_preflight.py --all`
33+
- Reconcile task metadata when needed: `python3 scripts/sync_task_metadata.py --help`
34+
- Follow task-oriented docs in `docs/START_HERE_BY_TASK.md`
35+
36+
## Pull Requests
37+
38+
- Explain what changed and why.
39+
- Call out any benchmark-impacting behavior changes.
40+
- Include validation commands run (health gate, tests, or scripts) in the PR description.

SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Reporting a Vulnerability
4+
5+
Please do not open a public GitHub issue for suspected security vulnerabilities.
6+
7+
Instead:
8+
9+
- Use GitHub Security Advisories / private vulnerability reporting for this repository if available.
10+
- If private reporting is not available, contact the maintainers privately through GitHub.
11+
12+
Include:
13+
14+
- A clear description of the issue
15+
- Steps to reproduce
16+
- Impact assessment (what could happen)
17+
- Any proposed mitigation or patch (if available)
18+
19+
## Scope Notes
20+
21+
This repository contains benchmark tasks and tooling and may include third-party fixture code under benchmark environments. If the issue is in third-party upstream code, please also report it to the upstream project maintainers when appropriate.

scripts/analyze_mcp_unique_haiku.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# -- Configuration --
2626

27-
STAGING_DIR = Path("/home/stephanie_jarmak/CodeContextBench/runs/staging")
27+
STAGING_DIR = Path(__file__).resolve().parent.parent / "runs" / "staging"
2828
RUN_SUFFIX = "_haiku_20260221_140913"
2929
BASELINE_CONFIG = "baseline-local-artifact"
3030
MCP_CONFIG = "mcp-remote-artifact"

scripts/analyze_run_coverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from collections import defaultdict
1313
from pathlib import Path
1414

15-
BASE_DIR = Path("/home/stephanie_jarmak/CodeContextBench")
15+
BASE_DIR = Path(__file__).resolve().parent.parent
1616
SELECTED_TASKS_FILE = BASE_DIR / "configs" / "selected_benchmark_tasks.json"
1717
RUNS_DIR = BASE_DIR / "runs" / "official"
1818

scripts/backfill_instruction_artifacts.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ def find_instruction(task_path: str, trial_dir: str) -> str:
178178
def main():
179179
dry_run = "--dry-run" in sys.argv
180180

181+
repo_root = Path(__file__).resolve().parent.parent
181182
search_roots = [
182-
Path(__file__).resolve().parent.parent / "runs" / "official",
183-
Path("/home/stephanie_jarmak/CodeContextBench/runs/validation"),
183+
repo_root / "runs" / "official",
184+
repo_root / "runs" / "validation",
184185
]
185186

186187
trial_count = 0

scripts/consolidate_staging.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@
2222
from collections import defaultdict
2323
from pathlib import Path
2424

25-
STAGING = Path("/home/stephanie_jarmak/CodeContextBench/runs/staging")
25+
REPO_ROOT = Path(__file__).resolve().parent.parent
26+
STAGING = REPO_ROOT / "runs" / "staging"
2627

2728

2829
def get_aggregate_data():
2930
result = subprocess.run(
3031
["python3", "scripts/aggregate_status.py", "--staging"],
3132
capture_output=True, text=True,
32-
cwd="/home/stephanie_jarmak/CodeContextBench",
33+
cwd=str(REPO_ROOT),
3334
)
3435
return json.loads(result.stdout)
3536

scripts/find_mcp_distracted.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from pathlib import Path
1616
from collections import defaultdict
1717

18-
STAGING_DIR = Path("/home/stephanie_jarmak/CodeContextBench/runs/staging")
18+
STAGING_DIR = Path(__file__).resolve().parent.parent / "runs" / "staging"
1919

2020
SDLC_SUITES = {"build", "debug", "design", "document", "fix", "secure", "test", "understand"}
2121

scripts/judge_demo.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,19 @@
5353
# Config
5454
# ──────────────────────────────────────────────────────────────────────
5555

56+
REPO_ROOT = Path(__file__).resolve().parent.parent
57+
5658
BL_TASK_DIR = Path(
57-
"/home/stephanie_jarmak/CodeContextBench/runs/staging/"
58-
"test_sonnet_20260219_015458_to_20260219_213932/"
59-
"baseline/ccb_test_test-unitgen-go-001_baseline/"
59+
REPO_ROOT / "runs" / "staging" /
60+
"test_sonnet_20260219_015458_to_20260219_213932" /
61+
"baseline" / "ccb_test_test-unitgen-go-001_baseline" /
6062
"test-unitgen-go-001__7SxXhsF"
6163
)
6264

6365
SG_TASK_DIR = Path(
64-
"/home/stephanie_jarmak/CodeContextBench/runs/staging/"
65-
"test_sonnet_20260219_015458_to_20260219_213932/"
66-
"sourcegraph_full/ccb_test_test-unitgen-go-001_sourcegraph_full/"
66+
REPO_ROOT / "runs" / "staging" /
67+
"test_sonnet_20260219_015458_to_20260219_213932" /
68+
"sourcegraph_full" / "ccb_test_test-unitgen-go-001_sourcegraph_full" /
6769
"sdlc_test_test-unitgen-go-001_TJ__VwAEJTL"
6870
)
6971

scripts/monitor_and_queue.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set -euo pipefail
55
# then automatically start SF runs when each finishes.
66

77
POLL_INTERVAL=60
8-
WORKDIR="/home/stephanie_jarmak/CodeContextBench"
8+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
9+
WORKDIR="$(cd "${SCRIPT_DIR}/.." && pwd)"
910

1011
PYTORCH_SB_SESSION="pytorch"
1112
SWEBENCH_SB_SESSION="swebench-base"

0 commit comments

Comments
 (0)