Repository navigation
refactor(parsec): move the parsec scripts under examples/, merging the shared pieces - #800
Merged
Merged
Conversation
…e shared pieces
scripts/parsec/ -> examples/parsec/, where the other benchmarks live. All moves
are git mv, so history follows.
The shared pieces come up to the example root, which both matches the
examples/<name>/{adapters,optimizer}/ convention and drops an indirection that
was never meaningful:
v4_t2_e1/common/adapters/ -> adapters/
v4_t2_e1/common/optimizer/ -> optimizer/
v4_t2_e1/common/parsec_paths.py -> parsec_paths.py
v4_t2_e1/tests/ -> tests/
The adapter and optimizer were already shared rather than copied — both arms
symlink the same files into every generated project — so keeping them nested
inside one arm's directory misrepresented the dependency. h4's constant was
literally named V4T2_DIR while pointing at files it co-owns; it is now
EXAMPLE_DIR.
Path fixes:
* adapter.py's _REPO_ROOT: parents[5] -> parents[3], two levels shallower.
_COMMON_DIR stays parents[1] — it resolved to common/ and now resolves to
the example root, which is where parsec_paths.py went.
* every arm driver's REPO_ROOT stays parents[3]: scripts/parsec/<arm>/ and
examples/parsec/<arm>/ are the same depth.
* tests/ moved up one level, so parents[1]/"common"/"adapters" -> parents[1]/
"adapters", parents[4]/"core" -> parents[3]/"core", and the three driver
modules are now reached through parents[1]/"v4_t2_e1".
* COMMON_ADAPTERS_SRC/COMMON_OPTIMIZER_SRC in both scaffolds now resolve from
the example root instead of a common/ child.
Also updated outside the moved tree: RUN_H4.md, docs/how-to/ccc/
CCC_PODMAN_SETUP.md, scripts/ccc/parsec_stack.sh and .gitignore all named the
old path. Repo-wide grep for "scripts/parsec" is now empty.
Adds examples/parsec/README.md — short, in the shape of toy_calc's and
toy_skill's rather than the three PROMPT.md files, because those are
paste-to-your-agent intake prompts and parsec was onboarded months ago by a
different route; writing one would describe a flow that never happened. It
covers the layout, the two env vars and why neither has a default, that the
bundles and results live on the parsec-history branch, and the three
trial-integrity detectors under h4/audit/.
Tests: 69 pass. The 2 failures in test_adapter.py are pre-existing on main
(stale TASK_ID assertions, flagged in #694) and fail identically before this
change; the next commit addresses them separately.
Signed-off-by: boazc <boazc@il.ibm.com>
Both have failed on main since TASK_ID support was removed from the adapter (flagged in #694, unrelated to the move in the previous commit). Separate commit so it can be dropped on its own. test_raises_clearly_when_task_id_unset asserted "TASK_ID" appears in the construction error. The adapter now raises about PARSEC_V4N instead, so the assertion was stale while its intent — an unconfigured checkout must stop construction rather than default to one — still holds. Renamed and re-pointed at the message actually raised. test_raises_clearly_when_task_dir_missing expected FileNotFoundError from resolving a single task that no longer exists as a concept. Verified what the multi-task adapter actually does with an empty tasks dir: it constructs fine and tasks("val") returns []. That is worth pinning precisely BECAUSE it does not raise — a run against the wrong checkout would otherwise "succeed" having measured nothing, and a zero task count is the only signal it happened. Suite is now 71 passed, 0 failed. Signed-off-by: boazc <boazc@il.ibm.com>
Contributor
|
🏷️ Automatic Labeling I've analyzed this pull request and added the following labels:
These labels were selected based on the PR title, description, and changed files. If you believe any labels are incorrect or missing, feel free to adjust them manually. |
…mples/parsec
Finishes what the previous commits started — nothing parsec-specific is left
outside examples/parsec/.
scripts/ccc/ was mixed. Four of its eight files mention parsec 8-52 times; the
other four mention it zero times. Moving only parsec_stack.sh (the one actually
asked about) would have left its two callers behind and kept the directory
mixed, so all four parsec scripts move together:
RUN_H4.md -> examples/parsec/RUN_H4.md
scripts/ccc/parsec_stack.sh -> examples/parsec/ccc/
scripts/ccc/parsec_bootstrap.sh -> examples/parsec/ccc/
scripts/ccc/run_ccc_parsec.sh -> examples/parsec/ccc/
scripts/ccc/run_ccc_parsec_g2.sh -> examples/parsec/ccc/
scripts/ccc/ now holds only the benchmark-agnostic four
(run_ccc_experiment.sh, run_ccc_smoke.sh, setup_podman.sh,
submit_ccc_experiment.sh), which is a cleaner split than before: none of them
referenced any of the moved scripts.
Only one path change was needed. parsec_stack.sh and parsec_bootstrap.sh have
no self-location logic at all — they derive everything from $PARSEC_V4N and
--tree respectively — so they move untouched apart from their usage comments.
The two run wrappers compute PROJECT_ROOT from their own directory, so
$SCRIPT_DIR/../.. becomes ../../.. ; verified it still resolves to the repo
root from the new depth.
References updated in 7 files, including docs/how-to/ccc/CCC_PODMAN_SETUP.md
and the usage lines inside the moved scripts themselves. Repo-wide grep for
scripts/ccc/parsec and scripts/ccc/run_ccc_parsec is empty, RUN.md never
referenced any of this, and all seven shell scripts pass bash -n.
Tests still 71 passed, 0 failed.
Signed-off-by: boazc <boazc@il.ibm.com>
OsherElhadad
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
scripts/parsec/→examples/parsec/, per Osher's note that this is where benchmarks belong. All moves aregit mv, so history follows.The shared pieces come up to the example root
This matches
examples/<name>/{adapters,optimizer}/as inskillsbench, and drops an indirection that was misleading: the adapter and optimizer were already shared rather than copied — both arms symlink the same files into every generated project. Keeping them nested inside one arm's directory misrepresented that.h4's constant was literally namedV4T2_DIRwhile pointing at files it co-owns; it's nowEXAMPLE_DIR.Path fixes
adapter.py_REPO_ROOTparents[5]→parents[3](two levels shallower)adapter.py_COMMON_DIRparents[1]— resolved tocommon/, now resolves to the example root, which is whereparsec_paths.pywentREPO_ROOTparents[3]—scripts/parsec/<arm>/andexamples/parsec/<arm>/are the same depthtests/parents[1]/"common"/"adapters"→parents[1]/"adapters",parents[4]/"core"→parents[3]/"core", drivers reached viaparents[1]/"v4_t2_e1"COMMON_*_SRCcommon/childAlso updated outside the moved tree, all of which named the old path:
RUN_H4.md,docs/how-to/ccc/CCC_PODMAN_SETUP.md,scripts/ccc/parsec_stack.sh,.gitignore. Repo-wide grep forscripts/parsecis now empty.README.mdrather thanPROMPT.mdThe three
PROMPT.mdfiles are paste-to-your-agent intake prompts for onboarding a new benchmark. Parsec was onboarded months ago by a different route, so writing one would describe a flow that never happened. This is a short README in the shape oftoy_calc's andtoy_skill's: layout, the two env vars and why neither has a default, that bundles and results live onparsec-history, and a pointer to the three trial-integrity detectors.Tests
71 passed, 0 failed — green for the first time.
The second commit fixes two tests that have failed on
mainsinceTASK_IDsupport was removed from the adapter (flagged in #694, unrelated to this move). It's separate so it can be dropped on its own.test_raises_clearly_when_task_id_unsetasserted"TASK_ID"appears in the construction error; the adapter now raises aboutPARSEC_V4N. Intent still holds, assertion re-pointed.test_raises_clearly_when_task_dir_missingexpectedFileNotFoundErrorfrom resolving a single task — no longer a concept. I checked what the multi-task adapter actually does with an empty tasks dir: constructs fine,tasks("val")returns[]. That's worth pinning because it doesn't raise — a run against the wrong checkout would otherwise "succeed" having measured nothing, and the zero task count is the only signal.