Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
5c62c3e
feat(grafana): add Dataset Composition row (fix size + difficulty val…
atharvas Aug 3, 2026
1efddfd
docs(monitoring): document Dataset Composition dashboard row
atharvas Aug 3, 2026
bd4fe0f
fix(docker): add manifest_empty warn invariant, defer benchmark_dest_…
atharvas Aug 3, 2026
0c38513
test(docker): reject a bypass that reassigns rc after the manifest se…
atharvas Aug 3, 2026
7b7acaf
docs(design): mark inert invariants and downgrade pytest_collect_fail…
atharvas Aug 3, 2026
a421287
docs(spec): verification measurability design
atharvas Aug 10, 2026
8fc88f1
docs(plan): verification measurability implementation plan
atharvas Aug 10, 2026
2479f83
docs(plan): close the producer-chain hole in the measurability plan
atharvas Aug 10, 2026
9367f5a
feat(docker): emit measurement facts from LSV results
atharvas Aug 10, 2026
bfb93c3
feat(docker): filter benchmark paths out of the oracle patch before a…
atharvas Aug 10, 2026
662772a
feat(docker): add measurability invariants to the manifest evaluator
atharvas Aug 10, 2026
4dd362d
feat(docker): bake measure.sh and the LSV helpers into task images
atharvas Aug 10, 2026
1e74b81
feat(agents): ship the oracle patch into the synthesis workspace
atharvas Aug 10, 2026
54c35fb
feat(agents): gate verification on a real speedup measurement
atharvas Aug 10, 2026
dcabe1f
test(docker): end-to-end measurability proof, plus docs
atharvas Aug 10, 2026
b18a26b
fix(docker): name LSV-unavailable and missing-measure.sh explicitly
atharvas Aug 10, 2026
a24bb75
test(agents): assert every Dockerfile.pr COPY source reaches the task…
atharvas Aug 10, 2026
932d94c
docs(spec): follow-on plans 2-4 under a no-public-figure-change const…
atharvas Aug 17, 2026
2a04f48
refactor(docker): remove the dead verifier API, guard the public figures
atharvas Aug 17, 2026
8ad0198
feat(db): add formulacode_task_overrides, private and enforced
atharvas Aug 17, 2026
0788fd7
feat(harbor): trial-time invariants over the reward
atharvas Aug 17, 2026
5a273b4
feat(scripts): audit timeout-verified containers, stamp-only
atharvas Aug 17, 2026
06a00cf
feat(overrides): wire expected_n and benchmark_dest, reviving two gates
atharvas Aug 18, 2026
692d8b9
docs(spec): reproducible container builds
atharvas Aug 23, 2026
b00912a
docs(spec): correct the asv-config defect
atharvas Aug 23, 2026
42e470d
docs(plan): pre-pass trial implementation plan
atharvas Aug 23, 2026
dd0f574
fix(templates): import sys in pytest_runner, and guard the exclusion
atharvas Aug 23, 2026
f621e33
fix(resolution): read the asv config with dict access, not getattr
atharvas Aug 23, 2026
301ac37
feat(scripts): honesty gate for built containers
atharvas Aug 23, 2026
caac23e
fix(resolution): read the asv matrix as name-to-versions
atharvas Aug 23, 2026
c632ef8
fix(docker): prune on disk pressure, not on a timer
atharvas Aug 23, 2026
b91af24
feat(pipeline): honour --tasks in stage 6, not only stage 7
atharvas Aug 23, 2026
6037ee7
feat(synthesis): record the no-agent build outcome
atharvas Aug 23, 2026
44eda59
feat(synthesis): add DATASMITH_SKIP_SIMILAR_CONTEXTS
atharvas Aug 23, 2026
be57a2c
fix(tests): make the suite incapable of writing to a real database
atharvas Aug 23, 2026
2cdce16
fix(templates): activate the env before calling asv in the run stage
atharvas Aug 23, 2026
31c747a
docs(plan): progress log for the autonomous pre-pass session
atharvas Aug 23, 2026
1475281
fix(resolution): stop harvesting bogus packages from install commands
atharvas Aug 23, 2026
8df62a8
test(synthesis): exercise the TRY_DEFAULT wiring, not just the method
atharvas Aug 23, 2026
5fb7080
feat(scripts): Harbor half of the honesty gate
atharvas Aug 23, 2026
e7ef559
docs(plan): correct the activation numbers
atharvas Aug 23, 2026
cfb1897
test(scripts): cover the honesty and Harbor gate policies
atharvas Aug 23, 2026
3f83ad6
fix(templates): stop the secret scan matching its own source
atharvas Aug 23, 2026
c861341
docs(plan): the no-agent path succeeds and yields an honest container
atharvas Aug 23, 2026
80e916a
docs(scripts): say plainly that the honesty gate is not a security bo…
atharvas Aug 23, 2026
3f2d654
docs(plan): note that extensions_import has never fired
atharvas Aug 23, 2026
6d4b407
fix(pipeline): stop dropping a third of the corpus from the no-agent …
atharvas Aug 23, 2026
705c191
docs(plan): record the corpus-eligibility exclusion
atharvas Aug 23, 2026
6ea1b95
feat(scripts): measure the no-agent build rate and the honest rate
atharvas Aug 23, 2026
2ec1b14
feat(db): half-open window filter, async siblings, and a large-select…
atharvas Aug 23, 2026
23f579f
perf(docker): cache the compile and the download, measured 3.1x on a …
atharvas Aug 23, 2026
16c5112
feat(github): window PR ingestion on merged_at and make GitHub failur…
atharvas Aug 23, 2026
4c277a5
fix(github): make the GraphQL rate-limit retry able to succeed
atharvas Aug 23, 2026
12d1aee
docs(plan): second honest container, and extensions_import now proven
atharvas Aug 23, 2026
bc7c35d
fix(runners): window stage 2 on merged_at instead of dropping half th…
atharvas Aug 23, 2026
3dcb44c
feat(db): a key-scoped in_filters, so a skip set stops reading its table
atharvas Aug 23, 2026
9ff1846
feat(runners): give stage 3 the diff, and the size gate that protects it
atharvas Aug 23, 2026
062c6bd
fix(pipeline): make stages 3, 4 and 5 mean the same window as stage 2
atharvas Aug 23, 2026
7fb3eee
perf(runners): bound stage 4's pool, and build stage 5's extractor once
atharvas Aug 23, 2026
03aa508
test(pipeline): measure the window with the resume predicate switched…
atharvas Aug 23, 2026
6a3780d
fix(prepass): build in parallel, and stop picking the oldest commit
atharvas Aug 23, 2026
22ffd85
fix(env): stop micromamba from pruning the interpreter away
atharvas Aug 23, 2026
0e66796
refactor(window): one definition of the run window, for every stage
atharvas Aug 23, 2026
d1e20fc
fix(pytest): scope collection, and survive one unimportable module
atharvas Aug 23, 2026
cc85734
fix(pkg): install the PEP 517 backend before a no-isolation build
atharvas Aug 23, 2026
1ff26b4
fix(honesty): two checks that reported the wrong thing on a good cont…
atharvas Aug 23, 2026
a79e49d
fix(run-tests): tell a repo with no benchmarks from our discovery fai…
atharvas Aug 23, 2026
7482ea0
docs: record the github rate-limit spike, and why an app does not fix it
atharvas Aug 23, 2026
d2ef11d
docs(prepass): record the 24-repo signature distribution and four mor…
atharvas Aug 23, 2026
2c23efe
test(pkg): lock the PEP 517 backend-to-distribution mapping
atharvas Aug 23, 2026
a77e734
fix(github): stop the client throwing away answers it was given
atharvas Aug 23, 2026
f13a359
feat(runners): make a stage say what it did, and preflight say what i…
atharvas Aug 23, 2026
46fb1d5
fix(runners): write the diff before the LLM call that can lose it
atharvas Aug 23, 2026
ba38d81
docs(filters): correct a docstring the stage split made false, and na…
atharvas Aug 23, 2026
b34d2b6
docs: correct the rate-limit spike — the 403s are historical, the 401…
atharvas Aug 23, 2026
433b782
test(github): pin the search cap to the client, not to one bisection
atharvas Aug 23, 2026
4e7c3d6
fix(manifest): stop the sealer silently dropping breadcrumbs
atharvas Aug 23, 2026
463386a
fix(run-tests): the pandas shim was invalid Python, and in every repo
atharvas Aug 23, 2026
6fdf159
docs(prepass): separate Python misassignment from resolution gaps
atharvas Aug 23, 2026
b899a20
docs: say which branch the spike read, and stop claiming an expiry he…
atharvas Aug 23, 2026
5e979ac
feat(stage6): DATASMITH_SKIP_IMAGE_PUSH, so a trial can build without…
atharvas Aug 23, 2026
c01ef98
fix(prepass): make the failure signature name a cause
atharvas Aug 23, 2026
6715c6d
feat(stage4): honour --tasks, so one repo can be re-resolved
atharvas Aug 23, 2026
58662de
fix(runners): stage 6 ends with a summary too, and a test that says so
atharvas Aug 23, 2026
a55b740
feat(manifest): record the pytest pass ratio, and do not gate on it
atharvas Aug 23, 2026
b3bbbcd
style(honesty): name the AST node tuple so both ruff configs agree
atharvas Aug 23, 2026
168ca5b
docs(prepass): record the first in-container confirmation
atharvas Aug 23, 2026
1ffc918
docs(spec): stage 4 resolution redesign, with the audit that motivate…
atharvas Aug 23, 2026
5c2f45c
docs(spec): the base image owns tooling only when its install succeeds
atharvas Aug 23, 2026
30bcfe6
perf(scripts): fast status via direct Postgres, not PostgREST
atharvas Aug 23, 2026
fbe111d
fix(agents): a model that cannot answer is not a model saying "no"
atharvas Aug 23, 2026
629c4df
docs(plan): stage 4 resolution redesign, 15 tasks
atharvas Aug 23, 2026
064ffa5
feat(resolution): parse requirements instead of rewriting them
atharvas Aug 23, 2026
381605b
refactor(resolution): route every requirement through the real parser
atharvas Aug 23, 2026
ce2cf0f
fix(resolution): keep the requirement lines uv accepts but PEP 508 ca…
atharvas Aug 23, 2026
120603d
fix(resolution): strip the comment where the seed is built, not only …
atharvas Aug 23, 2026
4689813
refactor(resolution): delete the global blocklist
atharvas Aug 23, 2026
bab29af
feat(resolution): read declared dependencies, stop inventing them
atharvas Aug 23, 2026
514d27a
fix(resolution): stop the harvest declare() was still being fed
atharvas Aug 23, 2026
1f6df24
feat(resolution): choose the interpreter from what the project declares
atharvas Aug 23, 2026
8269797
fix(resolution): make the package root independent of dict order
atharvas Aug 23, 2026
ae7996c
fix(resolution): close the third order-dependent root, and read asv t…
atharvas Aug 23, 2026
4808188
docs(plan): Task 6 has three order-dependent returns, not two
atharvas Aug 23, 2026
c6bf3f9
feat(resolution): pin project dependencies, and only those
atharvas Aug 23, 2026
6d701f7
feat(resolution): keep the cheap check, drop the claim
atharvas Aug 23, 2026
d50c617
refactor(resolution): compose six units instead of one 669-line branch
atharvas Aug 23, 2026
9fb3d1c
test(resolution): cover the asv matrix reader the plan assumed existed
atharvas Aug 23, 2026
658ab13
fix(resolution): probe a real interpreter, and keep foreign names out…
atharvas Aug 23, 2026
4b4a026
test(resolution): dry-run every interpreter the ladder can return
atharvas Aug 23, 2026
62ad7d6
feat(db): provenance and an advisory probe on packages
atharvas Aug 23, 2026
3f42826
feat(runners): persist what the resolver actually found
atharvas Aug 23, 2026
85090a7
feat(pipeline): order on the probe instead of excluding on it
atharvas Aug 23, 2026
8970f31
fix(docker): put the interpreter in the repo image tag
atharvas Aug 23, 2026
a766e6e
fix(docker): build in the package root stage 4 discovered
atharvas Aug 23, 2026
018195d
fix(docker): key the repo image on the package root as well
atharvas Aug 23, 2026
d85118e
docs(spec): the cached base image, not the run, fixes the interpreter
atharvas Aug 23, 2026
a0f97cc
test(resolution): lock in the 13 audited commits as golden fixtures
atharvas Aug 23, 2026
dfa4217
refactor(resolution): delete the filter module the redesign replaced
atharvas Aug 23, 2026
c1a86de
fix(resolution): a pinned patch level still names rung 1
atharvas Aug 23, 2026
41009d0
test(update): the can_install guard was asserting from the wrong dire…
atharvas Aug 23, 2026
4267a46
docs(db): dropped_requirements holds req, not raw
atharvas Aug 23, 2026
317bb49
test: close two guards that could not see what they were guarding
atharvas Aug 23, 2026
9c2e6c0
docs(resolution): describe the six units that replaced the two strate…
atharvas Aug 23, 2026
526f525
docs(resolution): correct three claims the identifier check could not…
atharvas Aug 23, 2026
05f2d9b
test(resolution): give the import_analyzer guard the half it was missing
atharvas Aug 23, 2026
af629fe
docs(spec): Cirq's empty seed is a defect, not the accepted case
atharvas Aug 23, 2026
45f19c5
feat(agents): judge the diff, not the title, when classifying perform…
atharvas Aug 23, 2026
bdef246
docs(spec): producer/verifier reflexive container builds
atharvas Aug 23, 2026
57be238
docs(spec): fold the advisor review into the producer/verifier design
atharvas Aug 23, 2026
2f1c626
fix(github): retry a 200 whose body was cut off mid-stream
atharvas Aug 23, 2026
4d3ad4a
docs(spec): fix two internal contradictions, and a claim I never checked
atharvas Aug 23, 2026
fe5de2f
docs(plan): implementation plan for producer/verifier reflexive builds
atharvas Aug 23, 2026
4e34d26
docs(plan): fix three blockers found by advisor review
atharvas Aug 23, 2026
a2a9788
merge: absorb spec/ingestion-window into the stage 4 redesign
atharvas Aug 23, 2026
b86cbf1
feat(reflexive): wire format for the producer/verifier loop
atharvas Aug 23, 2026
99258e9
docs(plan): close two seams found before tasks 2, 3 and 8 launched
atharvas Aug 23, 2026
3f14035
feat(reflexive): grade severity in our code, not the agent's prompt
atharvas Aug 24, 2026
0451411
fix(agents): truncate the patch PerfClassifier sends, like the judge …
atharvas Aug 24, 2026
6745f94
fix(reflexive): close three seams the Task 2 audit found in the plan'…
atharvas Aug 24, 2026
5766673
feat(reflexive): the verifier's fact-collecting battery
atharvas Aug 24, 2026
afca2e8
fix(reflexive): stop tail masking the exit status of every battery co…
atharvas Aug 24, 2026
8e9a035
feat(reflexive): the verifier half, fail-closed on every path
atharvas Aug 24, 2026
5005c20
test(reflexive): make the verifier's read-only posture structural
atharvas Aug 24, 2026
241ab91
feat(reflexive): the producer half, owning exactly two scripts
atharvas Aug 24, 2026
57e1ebe
feat(reflexive): the loop, with no-progress detection that can fire
atharvas Aug 24, 2026
a0cbe1c
fix(reflexive): make the two _signature implementations actually agree
atharvas Aug 24, 2026
abf255d
feat(sandbox): build without the legacy pytest gate, and report the tag
atharvas Aug 24, 2026
01b16ae
feat(stage6): PRODUCE_VERIFY, behind a flag that is off by default
atharvas Aug 24, 2026
4b71b01
test(reflexive): give PRODUCE_VERIFY executing coverage, not source g…
atharvas Aug 24, 2026
56b8443
docs(claude): document the producer/verifier tunables
atharvas Aug 24, 2026
f63a536
fix(github): await a rate-limit reset instead of sleeping the event loop
atharvas Aug 24, 2026
b1bfbce
fix(reflexive): close the tunables guard, and hoist two knobs to modu…
atharvas Aug 24, 2026
ed5b1ec
test(reflexive): the 16-container validation set and its pass criterion
atharvas Aug 24, 2026
cdbcfca
fix(runners): stop tokenising a 150 KB diff on the event loop
atharvas Aug 24, 2026
0ff0087
fix(reflexive): the battery failed identically on every container
atharvas Aug 24, 2026
7a29b52
docs(handoff): the producer/verifier gate failed its negative control
atharvas Aug 24, 2026
86b1644
Merge remote-tracking branch 'origin/worktree-gh-rate-limit-spike' in…
atharvas Aug 25, 2026
dce8ab4
merge: rl-prep task-issue notes and the oracle flag on the reward writer
atharvas Aug 25, 2026
5100c87
feat(resolution): say when the ceiling, not the project, chose the in…
atharvas Aug 25, 2026
5278a85
feat(reflexive): collect integrity facts from outside the container
atharvas Aug 25, 2026
5348471
fix(reflexive): a build that failed can never be an accept
atharvas Aug 25, 2026
a1f64c2
fix(reflexive): the stall detector could not see a repeat
atharvas Aug 25, 2026
a1488e9
fix(stage6): the no-agent path skipped the gate entirely
atharvas Aug 25, 2026
c1cc295
feat(measure): make the measurement step legible when it fails
atharvas Aug 25, 2026
3123a36
test(reflexive): pin the validation set to digests, not tags
atharvas Aug 25, 2026
efee5ae
chore(infra): reconcile the model list from live servers
atharvas Aug 25, 2026
ba13cbe
docs: the host image scan, and what the route to 100 containers costs
atharvas Aug 25, 2026
2e5619c
merge: the stage 4 resolution redesign, onto the verified-container b…
atharvas Aug 25, 2026
588fcbc
chore: make the merged branch pass its own checks
atharvas Aug 25, 2026
f9abd46
feat(ingestion): stop paying for six repositories that never produce …
atharvas Aug 25, 2026
b2e00bb
docs(ingestion): a runbook and a preflight for the failures this run …
atharvas Aug 25, 2026
66160e1
feat(publish): require a verified container, not just a fast harbor run
atharvas Aug 26, 2026
d0f8982
fix(publish): make the stage 8 dry run report what stage 8 would publish
atharvas Aug 26, 2026
9a457db
fix(reflexive): stop timeouts from killing live work and orphaning co…
atharvas Aug 26, 2026
2620941
fix(reflexive): stop ending runs that had actually changed the failure
atharvas Aug 26, 2026
765f859
feat(stage6): seed PRODUCE_VERIFY from a context that already builds
atharvas Aug 26, 2026
b582a5b
fix(templates): build shapely against conda's GEOS, not the system one
atharvas Aug 26, 2026
325f34c
feat(scripts): a grind driver and a goal checker for the 100-containe…
atharvas Aug 26, 2026
9ed5e10
docs: the 2026-08-25 findings, the new knobs, and the downstream hand…
atharvas Aug 26, 2026
e8f747a
Durable oracle snapshots: align key convention + publish server-side
ArjunS07 Aug 28, 2026
499ad1a
Bake LSV baseline + deps into the task image (kill per-trial re-measure)
ArjunS07 Aug 28, 2026
25b6c2d
Don't pip-install deps at image-build time (base already has LSV; bui…
ArjunS07 Aug 28, 2026
09ff32c
lsv_init: skip initialize_diffcheck entirely when baked baseline is s…
ArjunS07 Aug 28, 2026
f0afde1
setup.sh: skip oracle snapshot capture in training runs (HARBOR_AGENT…
ArjunS07 Aug 29, 2026
966beb6
lsv parser: Python 3.8-safe summary prefix strip (removeprefix is 3.9+)
ArjunS07 Aug 29, 2026
10ce814
adapter: LSV rounds default to DATASMITH_LSV_ROUNDS (was hardcoded 1)
ArjunS07 Sep 1, 2026
4af993d
harbor template: serialize LSV measure via the host measure-gate (fai…
ArjunS07 Sep 4, 2026
a088b7b
harbor template: measure-gate SID from kernel uuid, 7200s acquire wai…
ArjunS07 Sep 6, 2026
1cacdc9
harbor template: snapshot verify runs with --parallel --workers 2 (en…
ArjunS07 Sep 6, 2026
4f253bd
harbor template: pin NUMBA_NUM_THREADS to the trial cpu quota
ArjunS07 Sep 6, 2026
da0b6ec
harbor_adapter: render stamp + drift check, and a render-only regen C…
ArjunS07 Sep 6, 2026
adaa396
handoff: pointer to top-level HANDOFF.md (2026-09-08)
ArjunS07 Sep 8, 2026
24f5e99
docs: HANDOFF.md -> pointer to rl-recipe/docs/HANDOFF.md
ArjunS07 Sep 8, 2026
ba3b46d
harbor_adapter/stamp: recursive template digest (rglob), keys relativ…
ArjunS07 Sep 22, 2026
00a1bbe
harbor_adapter: nested template layout (environment/, tests/, solutio…
ArjunS07 Sep 22, 2026
3f205a2
harbor_adapter/template: merge Dockerfile, setup.sh, test.sh from har…
ArjunS07 Sep 22, 2026
46fe98a
harbor_adapter/template: merge the Python helpers (lsv_init, parser, …
ArjunS07 Sep 22, 2026
4a0094d
migrations: oracle rebuild campaigns, passes and canonical per-task a…
ArjunS07 Sep 22, 2026
d1c84d0
scripts/sync_harbor_adapter.py: generate harbor's adapters/formulacod…
ArjunS07 Sep 22, 2026
82a2481
deslop: cut 00033 migration commentary to a short header and two one-…
ArjunS07 Sep 25, 2026
05da0d4
Merge branch 'formulacode/oracle-rows-migration' into formulacode/can…
ArjunS07 Sep 25, 2026
2632175
deslop: trim harbor_adapter comments/docstrings, drop unused split_ta…
ArjunS07 Sep 25, 2026
33bebfa
migrations: store oracle rebuild results as columns on formulacode_ta…
ArjunS07 Sep 25, 2026
4db13f7
harbor_adapter: reuse baked LSV baseline only when the timing fingerp…
ArjunS07 Sep 25, 2026
86fcc81
harbor_adapter: public API, refuse literal credentials in verifier en…
ArjunS07 Sep 25, 2026
510a640
pytest_runner: regression ran only when the base side produced results
ArjunS07 Sep 25, 2026
a963f8e
Merge remote-tracking branch 'origin/formulacode/oracle-rows-migratio…
ArjunS07 Sep 25, 2026
53088a4
deslop: merge the verifier env render tests, drop a restating comment
ArjunS07 Sep 25, 2026
58f489c
deslop: drop a restating comment in pytest_runner and its test docstring
ArjunS07 Sep 25, 2026
ab8219c
deslop: fold the adapter's per-file writers into generate_task, drop …
ArjunS07 Sep 25, 2026
f1121af
Merge remote-tracking branch 'origin/formulacode/canonical-task-templ…
ArjunS07 Sep 25, 2026
b0c73f9
harbor_adapter: base-side pytest imports plugins next to the runner, …
ArjunS07 Sep 28, 2026
1eda134
harbor_adapter: rebuild compiled extensions after a patch; snapshots …
ArjunS07 Sep 28, 2026
30783d2
harbor_adapter: extract downloaded snapshots on Pythons without the t…
ArjunS07 Sep 28, 2026
0f4055f
harbor_adapter: fingerprint the CPU count libraries see and whether C…
ArjunS07 Sep 28, 2026
d8ff6a1
harbor template: time base and patched code in pairs in the same cont…
ArjunS07 Sep 28, 2026
ee53c83
lsv_measure: drop the base_commit check on the base copy; images keep…
ArjunS07 Sep 28, 2026
2ee8277
Merge remote-tracking branch 'origin/formulacode/paired-measure' into…
ArjunS07 Sep 28, 2026
4970048
harbor_adapter: detect compiled-source changes without piping into gr…
ArjunS07 Sep 28, 2026
dd67738
harbor_adapter: remove the temp dirs benchmarks leave after each pair…
ArjunS07 Sep 29, 2026
eaabe28
harbor_adapter: rebuild with numpy's include dir in CPPFLAGS; old set…
ArjunS07 Sep 29, 2026
f8446ed
harbor_adapter: in paired mode reuse the baked deps DB when the sha a…
ArjunS07 Sep 29, 2026
a2ec209
harbor_adapter: pytest runs under a time limit (FC_PYTEST_TIMEOUT, de…
ArjunS07 Sep 30, 2026
4e0b1e7
harbor_adapter: a killed or timed-out pytest runner no longer stops t…
ArjunS07 Sep 30, 2026
5a3b3a9
harbor_adapter: the rebuild after a patch keeps GCC 14's new errors a…
ArjunS07 Sep 30, 2026
f82b30d
harbor_adapter: say image build instead of bake; FORMULACODE_IMAGE_BA…
ArjunS07 Sep 30, 2026
bf74ab8
harbor_adapter: new images use LSV with dependencies limited to files…
ArjunS07 Sep 30, 2026
7779be4
Merge remote-tracking branch 'origin/chore/no-bake-terms' into fix/ph…
ArjunS07 Sep 30, 2026
1e24400
harbor_adapter: new images use LSV main (dependency fix and packaging…
ArjunS07 Sep 30, 2026
1adbc3b
harbor_adapter: find src-layout packages whose name differs from the …
ArjunS07 Sep 30, 2026
10fd6ce
harbor_adapter: the image build runs LSV's coverage pass only; paired…
ArjunS07 Sep 30, 2026
d4500e1
harbor_adapter: at image build, move an untracked asv_runner/ out of …
ArjunS07 Sep 30, 2026
00e0980
harbor_adapter: at image build, a benchmark folder without __init__.p…
ArjunS07 Sep 30, 2026
bf6decc
harbor_adapter: new images use LSV with the teardown fix (lsv#7)
ArjunS07 Sep 30, 2026
156b759
harbor_adapter: the rebuild after a patch falls back to an isolated b…
ArjunS07 Sep 30, 2026
0104ecd
harbor_adapter: detect_source_root uses the editable install's packag…
ArjunS07 Sep 30, 2026
c1ec36c
harbor_adapter: the rebuild after a patch builds extensions in place …
ArjunS07 Oct 1, 2026
736459a
harbor_adapter: the in-place extension build uses stdlib distutils (n…
ArjunS07 Oct 1, 2026
0be287f
harbor_adapter: detect_source_root finds a namespace package named by…
ArjunS07 Oct 1, 2026
e486711
harbor_adapter: the rebuild after a patch runs in the folder the pack…
ArjunS07 Oct 1, 2026
8eed0b1
harbor_adapter: at image build, install benchmark-only deps the env l…
ArjunS07 Oct 5, 2026
10c7379
harbor_adapter: benchmark deps step runs on Python 3.8 and cannot sto…
ArjunS07 Oct 5, 2026
29523c1
harbor_adapter: pin every installed distribution, editable ones inclu…
ArjunS07 Oct 5, 2026
0ce3b1e
harbor_adapter: install benchmark deps before the LSV session discove…
ArjunS07 Oct 5, 2026
1cc50f2
task template: register the asv machine at trial start so asv run wor…
ArjunS07 Oct 5, 2026
494ce61
task template: task env on PATH, no oracle diff in the image, prompt …
ArjunS07 Oct 6, 2026
75b84c2
task template: no default measure gate URL; without MEASURE_GATE_URL …
ArjunS07 Oct 6, 2026
624ef0f
task template: diff the agent's work against a commit of the image's …
ArjunS07 Oct 6, 2026
d9593a7
task template: test caches (.hypothesis, .pytest_cache) are run outpu…
ArjunS07 Oct 6, 2026
67f4988
task template: no background gc from the baseline commit, so base_cop…
ArjunS07 Oct 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Run tests
run: uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
run: uv run python -m pytest -m "not slow" --cov --cov-config=pyproject.toml --cov-report=xml

- name: Check typing
run: uv run mypy
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,12 @@ jobs/
FLOWCHART.md
WORKFLOW.md
google*.html

# runtime output and local scratch
logs/
rl-prep/
rl-prep.zip
*.swp

# tokens.env is ignored above; its timestamped backups carry the same secrets
tokens.env.bak*
208 changes: 177 additions & 31 deletions CLAUDE.md

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions HANDOFF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Handoff — see `formula-code/rl-recipe`

The full project handoff lives in the **rl-recipe** repo:
**`docs/HANDOFF.md`** → https://github.com/formula-code/rl-recipe/blob/formulacode/handoff-2026-09-08/docs/HANDOFF.md

This is one of five repos: `skyrl` (trainer) · `harbor` (trial framework) · `datasmith` (measurement) · `rl-recipe` (recipe + live services) · `rl-experiments` (oracle table / tasks / dashboard / logs). The doc above has the repo map, how-to-run, and the out-of-repo glue.
63 changes: 46 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
##@ Development
## Everyday targets. `check` and `test` run on every commit; CI invokes
## `make check` by name (.github/workflows/main.yml), so do not rename it.

.PHONY: install
install: ## Install the virtual environment and install the pre-commit hooks
install: ## Install the virtual environment and the pre-commit hooks (once per clone)
@echo "Creating virtual environment using uv"
@uv sync --all-extras
@uv pip install -e .
@uv run pre-commit install

.PHONY: check
check: ## Run code quality tools.
check: ## Run code quality tools (lock check, pre-commit, mypy, deptry)
@echo "Checking lock file consistency with 'pyproject.toml'"
@uv lock --locked
@echo "Linting code: Running pre-commit"
Expand All @@ -17,9 +21,13 @@ check: ## Run code quality tools.
@uv run deptry src

.PHONY: test
test: ## Test the code with pytest
test: ## Test the code with pytest (excludes -m slow)
@echo "Testing code: Running pytest"
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
@uv run python -m pytest -m "not slow" --cov --cov-config=pyproject.toml --cov-report=xml

##@ Packaging
## Local wheel builds. CI publishing does not use these targets --
## .github/workflows/publish.yml runs `uv run python -m build` directly.

.PHONY: build
build: clean-build ## Build wheel file
Expand All @@ -31,11 +39,18 @@ clean-build: ## Clean build artifacts
@echo "Removing build artifacts"
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"

##@ Housekeeping

.PHONY: docker-clean
docker-clean: ## Clean up dangling Docker images and containers
docker-clean: ## Prune dangling Docker images and containers (reclaim build disk)
@echo "Cleaning up dangling Docker images and containers"
@docker system prune -f

##@ Database (local Supabase)
## The tunnel serves both hostnames off the single `datasmith-db` tunnel:
## db.formulacode.org (CF Access + service-role key) and
## api.formulacode.org (public anon reads, no Access gate).

.PHONY: supabase-up
supabase-up: ## Start local Supabase instance
@npx supabase start
Expand All @@ -48,8 +63,14 @@ supabase-down: ## Stop local Supabase instance
supabase-status: ## Show Supabase service status and URLs
@npx supabase status

.PHONY: db-tunnel
db-tunnel: ## Expose PostgREST via Cloudflare Tunnel (db + api .formulacode.org)
@cloudflared tunnel --config ~/.cloudflared/config-db.yml run datasmith-db

##@ Monitoring (Grafana)

.PHONY: grafana-migrate
grafana-migrate: ## Apply the grafana_ro read-only database role
grafana-migrate: ## Apply the grafana_ro read-only role (once per Supabase volume)
@docker exec supabase_db_datasmith_new psql -U postgres -d postgres -f /dev/stdin < supabase/migrations/00009_grafana_readonly.sql
@echo "grafana_ro role created"

Expand All @@ -67,17 +88,15 @@ grafana-logs: ## Tail Grafana container logs
@docker compose -f grafana/docker-compose.yml logs -f

.PHONY: grafana-tunnel
grafana-tunnel: ## Expose Grafana publicly via Cloudflare Tunnel
grafana-tunnel: ## Expose Grafana via Cloudflare Tunnel (datasmith-grafana)
@cloudflared tunnel run datasmith-grafana

.PHONY: db-tunnel
db-tunnel: ## Expose Supabase PostgREST API via Cloudflare Tunnel (db.formulacode.org)
@cloudflared tunnel --config ~/.cloudflared/config-db.yml run datasmith-db
##@ Model proxy (LiteLLM + vLLM)

LITELLM_VENV := .venv-litellm

.PHONY: model-proxy-install
model-proxy-install: $(LITELLM_VENV)/.installed ## Set up the persistent venv used by model-tunnel
model-proxy-install: $(LITELLM_VENV)/.installed ## Build the .venv-litellm venv (once per machine; also the stale-venv fix)

$(LITELLM_VENV)/.installed:
@echo "Creating $(LITELLM_VENV) and installing litellm[proxy] + prisma"
Expand All @@ -90,7 +109,7 @@ $(LITELLM_VENV)/.installed:
@touch $@

.PHONY: model-tunnel
model-tunnel: $(LITELLM_VENV)/.installed ## Start LiteLLM proxy + Cloudflare Tunnel for vLLM (model.formulacode.org)
model-tunnel: $(LITELLM_VENV)/.installed ## Start LiteLLM + reconciler + Cloudflare Tunnel (model.formulacode.org)
@set -eu; \
set -a; . ./tokens.env; set +a; \
REPO_ROOT=$$(pwd); \
Expand All @@ -104,15 +123,25 @@ model-tunnel: $(LITELLM_VENV)/.installed ## Start LiteLLM proxy + Cloudflare Tun
if ! kill -0 $$LITELLM_PID 2>/dev/null; then echo "litellm exited before becoming ready" >&2; exit 1; fi; \
sleep 1; \
done; \
echo "litellm ready on :4100 (pid $$LITELLM_PID); starting cloudflared"; \
echo "litellm ready on :4100 (pid $$LITELLM_PID); starting model reconciler"; \
( exec "$$REPO_ROOT/$(LITELLM_VENV)/bin/python" \
"$$REPO_ROOT/infra/refresh_models.py" --watch ) & \
REFRESH_PID=$$!; \
trap 'kill $$LITELLM_PID $$REFRESH_PID 2>/dev/null || true; wait $$LITELLM_PID $$REFRESH_PID 2>/dev/null || true' EXIT INT TERM; \
echo "reconciler running (pid $$REFRESH_PID); starting cloudflared"; \
cloudflared tunnel --config ~/.cloudflared/config-model.yml run datasmith-model

.PHONY: model-refresh
model-refresh: ## Reconcile the LiteLLM registry with live vLLM servers once (ARGS="--dry-run")
@set -a; . ./tokens.env; set +a; \
python3 infra/refresh_models.py $(ARGS)

.PHONY: help
help:
@uv run python -c "import re; \
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"


@awk 'BEGIN {FS = ":.*## "; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} \
/^##@ / {printf "\n\033[1m%s\033[0m\n", substr($$0, 5)} \
/^[a-zA-Z_-]+:.*## / {printf " \033[36m%-21s\033[0m %s\n", $$1, $$2}' \
$(MAKEFILE_LIST)
@echo

.DEFAULT_GOAL := help
35 changes: 17 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ By default, each operation is cached in Supabase so you don't keep hitting expen
A pull request is useless if you cannot build a reproducible environment for it. fc-data supports building docker images for any pull request using a three-tier hierarchy:

```python
from datasmith.docker import ImageManager, MultiObjVerifier, SmokeVerifier, ProfileVerifier
from datasmith.docker import ImageManager, read_build_manifest, evaluate_invariants

mgr = ImageManager()
mgr.build_base_image() # formulacode/base:latest (uses the default Dockerfile.base)
Expand All @@ -152,29 +152,28 @@ mgr.build_repo_image("pandas-dev", "pandas", context="path/to/custom/context")
mgr.build_pr_image("pandas-dev", "pandas", 16222, context="path/to/custom/context")


# Verify an image with a chain of verifiers — short-circuits on first failure.
verifier = MultiObjVerifier(verifiers=[
SmokeVerifier("pandas"), # can we import the package?
ProfileVerifier(timeout=300), # can we discover and run ASV benchmarks?
])
result = verifier.verify("formulacode/pandas-dev-pandas:16222")
# result.ok, result.rc, result.stdout, result.stderr, result.duration_s
# Every task image seals a build manifest. Read it back and evaluate the
# invariants over it — no rebuild, no container run.
manifest = read_build_manifest("formulacode/pandas-dev-pandas:16222")
report = evaluate_invariants(manifest)
# report.ok is True (all fatals held), False (a fatal failed), or None (no
# manifest — true of any image built before manifests existed).
# report.fatal / report.warnings / report.skipped list the invariant ids.
```

One of the main features of `fc-data` is the ability to automatically synthesize docker containers for a pull request. The synthesizer is a state machine that checks Supabase for cached contexts, tries similar build scripts, then falls back to an installed CLI agent (Claude Code, Codex, or Gemini — auto-detected):

```python
from datasmith.agents import Synthesizer
from datasmith.docker import MultiObjVerifier, SmokeVerifier, ProfileVerifier
from datasmith.docker.context import DockerContext

# The verifier chain validates each synthesis attempt.
verifier = MultiObjVerifier(verifiers=[
SmokeVerifier("pandas"), # can we import the package?
ProfileVerifier(timeout=300), # can we discover and run ASV benchmarks?
])
# Each synthesis attempt is validated by local_ci.py inside the sandbox: it
# builds the image, runs the test suite, runs the measure step, and gates on
# the build manifest's FATAL invariants.

# Load a base Docker build context (Dockerfile + shell scripts) to iterate on.
# A DockerContext holds the Dockerfile + shell scripts. The synthesizer
# discovers its own starting context (cache -> similar -> default template),
# so you rarely construct one by hand; this is how you would load one.
base_context = DockerContext.from_directory("dataset/formulacode_verified/pandas-dev_pandas/abc123")

synth = Synthesizer(max_attempts=3)
Expand All @@ -183,11 +182,11 @@ ctx = synth.run(
repo="pandas",
issue_number=16222,
pr_context="This PR optimizes groupby performance by ...",
verifier=verifier,
sha="abc123def456",
base_context=base_context,
base_sha="def456abc123", # the pre-optimization commit the image checks out
env_payload='{"dependencies": ["numpy==1.26.0", "cython==3.0.0"]}',
python_version="3.10",
solution_patch=pr_patch, # the oracle patch, used only to verify measurability
)
# Checking cache for pandas-dev/pandas@abc123def456... [MISS]
# Found 4 similar scripts from pandas-dev/pandas
Expand All @@ -206,7 +205,7 @@ This can be run asynchronously as well for multiple tasks (WARNING: Might be exp
```python
from datasmith.runners import SynthesizeImagesRunner

runner = SynthesizeImagesRunner(synth, verifier, n_concurrent=8)
runner = SynthesizeImagesRunner(synth, n_concurrent=8)
await runner.run(pr_items)
# Returns None entries for PRs where synthesis failed.
```
Expand Down
6 changes: 3 additions & 3 deletions docs/design/Datasmith - Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pr.publish() # Puts the task on huggingface (and the local database)
One of the main features of `datasmith` is the ability to automatically synthesize docker containers for a pull request. Here is how it works...

```python
pr_buildscript = ds.agents.synthesize_image(pr, verifier=ds.docker.MultiObjVerifier)
pr_buildscript = ds.agents.synthesize_image(pr) # verification is internal (local_ci.py + build manifest)
# Checking if base image exists... [PASS]
# Checking if pandas-dev/pandas image exists... [FAIL]
# Making pandas-dev/pandas container...
Expand All @@ -163,7 +163,7 @@ If ALL attempts fail, `synthesize_image` logs every attempt (stderr, stdout, mod

This can be run asynchronously as well for multiple tasks (WARNING: Might be expensive!)!
```python
pr_build_scripts = ds.runners.synthesize_images(prs=[...], verifier=ds.docker.MultiObjVerifier, n_concurrent=64)
pr_build_scripts = ds.runners.synthesize_images(prs=[...], n_concurrent=64)
# Returns list[str | None]. None entries are PRs where synthesis failed.
```

Expand Down Expand Up @@ -199,7 +199,7 @@ Datasmith contains seven high-level modules. FormulaCode-specific logic lives di
* `ds.docker.verify.smoke`: A simple smoke test for the build (`import {package_name}`).
* `ds.docker.verify.profile`: Collects asv benchmarks and runs the asv profiler with `--quick`.
* `ds.docker.verify.pytest`: Collects the pytest suite with `testrunner` without errors. Runs pytest with a 45-second timeout.
* `ds.docker.verify.MultiObjVerifier`: Chains `smoke -> profile -> pytest` verifiers.
* ~~`ds.docker.verify.MultiObjVerifier`: Chains `smoke -> profile -> pytest` verifiers.~~ **REMOVED** — never reachable from any pipeline path. Superseded by `local_ci.py` + the build manifest (`read_build_manifest` / `evaluate_invariants`).
* `ds.agents`: Agents for dynamic filtering and automatic build script generation. Simple agents use `dspy`; complex agents use an installed agent (like `codex`). Each module should define its default prompt as a constant.
* `ds.agents.dspy.classifier`: Abstract base class for DSPy classifiers.
* `ds.agents.codex`: Wrapper for invoking codex in fully autonomous mode (`codex exec --full-auto "..."`). Manages the working directory, prompt construction, and output capture via `--json` streaming.
Expand Down
14 changes: 12 additions & 2 deletions docs/design/components/datasmith.agents.synthesizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ flowchart TD
4. The agent iterates internally: reads AGENTS.md, runs verify, reads failure.json, edits build scripts, repeats
5. On exit, checks for `verification_success.json` and reads back the modified `DockerContext`

**PRODUCE_VERIFY** — The reflexive producer/verifier loop, behind `DATASMITH_PV_ENABLED`. Replaces LLM_GENERATE when enabled; the states before it are untouched, so a repo the stock template already builds never reaches it.

The loop **seeds its first round from the stored context** when `candidate_containers` already holds one for this `(owner, repo, sha)`. Only `docker_build_pkg.sh` and `docker_build_run.sh` carry over — the two files the producer owns — so template fixes to the other scripts stay live. Without this, a `--force` re-run restarted from the stock template and repeated a repair the previous run had already completed: `xdslproject/xdsl#1332` was rejected at round 1 on `pytest_collect` despite an earlier run having solved exactly that.

Seeding changes only where the loop *starts*. The image is rebuilt, the host-side image scan re-run, and the verifier re-grades from scratch, so a seeded round earns its verdict on the same evidence as an unseeded one. Because stored contexts are agent-authored — 128 repositories' stored contexts install a `sitecustomize` shim into site-packages, which is why TRY_SIMILAR can be switched off via `DATASMITH_SKIP_SIMILAR_CONTEXTS` — a stored context is put through `classify_context` before it is used, and a tampered one is discarded in favour of the template. The host image scan remains the gate; the audit exists so a known-bad row costs zero rounds instead of eight.

A **rejected TRY_DEFAULT build falls through to PRODUCE_VERIFY** rather than ending the task. The image built and scanned clean; the verifier simply did not accept it — overwhelmingly on `pytest_pass_ratio` — and that is precisely what the producer exists to repair. On 2026-08-25 `dask/dask#6137`, `dask/dask#6186` and `UXARRAY/uxarray#1118` each produced a clean-scanning container within one hour and were written off as `unverified` rows nothing would revisit.

The context is saved before the fall-through, so the build is never lost if the producer then fails, and the loop is seeded with that context — a build known to work is a far better round-1 starting point than the template. The fall-through applies **only when PRODUCE_VERIFY can actually run** (`DATASMITH_PV_ENABLED` set, an agent available). With the flag off the sole remaining path is LLM_GENERATE, a full sandbox agent, and spending one on every rejected container is not a change this branch should make; the legacy contract that a successful default build ends the task is preserved there.

**FAIL** — All strategies exhausted. Logs a warning and returns `None`.

### Trace
Expand Down Expand Up @@ -184,7 +194,7 @@ class CodexResult:
| `owner`, `repo`, `issue_number` | Pipeline item | Identifies the PR |
| `sha` | Pipeline item | Merge commit SHA |
| `pr_context` | Rendered problem statement | Full PR context for the AGENTS.md template |
| `verifier` | Caller (typically `MultiObjVerifier`) | Validates the built Docker image (used by TRY_SIMILAR) |
| ~~`verifier`~~ | *(removed)* | The verifier API was dead and is gone. TRY_SIMILAR validates via `verify_context`, which runs `local_ci.py` — build, tests, measure, then the build manifest's FATAL invariants. |
| `base_context` | Pipeline item or templates | Base Docker context with all 9 files |
| `env_payload` | `packages` table (via `ds.resolution`) | JSON array of pinned dependency strings. Populated by the `resolve_packages` pipeline stage, which runs `analyze_commit()` and persists results to the `packages` Supabase table keyed by `(owner, repo, sha)`. See `datasmith.resolution.md`. |
| `python_version` | `packages` table (via `ds.resolution`) | Target Python version (e.g., "3.10"). Selected by temporal filtering against the commit date to avoid anachronisms (e.g., not using Python 3.12 for a 2019 commit). |
Expand Down Expand Up @@ -215,7 +225,7 @@ await runner.run(pr_items)

Each item is dispatched via `asyncio.to_thread()` so multiple PRs are synthesized concurrently without blocking the event loop. Failed items raise `RuntimeError` and are logged to `runner_failures` — the runner never aborts.

Items now include additional fields passed through to the sandbox: `env_payload`, `python_version`, and optionally `base_context`. These are sourced from the `packages` table (populated by the `resolve_packages` pipeline stage) rather than from columns on `pull_requests`. The synthesize stage joins `pull_requests` with `packages` on `(owner, repo, merge_commit_sha = sha)` to obtain resolution data. PRs without a corresponding `packages` row (or where `can_install = FALSE`) are skipped.
Items now include additional fields passed through to the sandbox: `env_payload`, `python_version`, and optionally `base_context`. These are sourced from the `packages` table (populated by the `resolve_packages` pipeline stage) rather than from columns on `pull_requests`. The synthesize stage joins `pull_requests` with `packages` on `(owner, repo, merge_commit_sha = sha)` to obtain resolution data. A PR without a corresponding `packages` row is skipped; **a PR whose seed the probe disliked is not.** `can_install` no longer gates — stage 4 gates nothing — and `probe_status` orders the queue instead, best-first. See [the pipeline guide](../../guide/pipeline.md#stage-4-resolve-packages).

## What was removed (2026-03-21)

Expand Down
Loading
Loading