feat(jobs): declare run attributes on JobConfig - #84
Merged
Conversation
… target-designs tutorial manager.job_set.jobs[0].run_hash reached into the manager's internals; manager.run() already returns a SweepResult that yields (job, cli_result) pairs, so iterate that public API to get each run's hash. Also gitignore the tutorial's demo registry. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ation Attributes describing what a job is trying to accomplish can now be set on JobConfig.attributes and are persisted to the registry (set_attributes) when the config is registered — in both the batch (SweepManager) and adaptive (strategies) dispatch paths. This removes the post-run tagging step: coverage (TargetDesign) matches immediately after run(), and YAML-defined jobs carry their intent via to_dict/from_dict round-trip. Attributes are intent, kept distinct from sweep parameters (config_parameters): the config need not know which requirement it fulfills. A so-attributed run is bad if it fails or is later marked bad. Tutorial reworked to declare attributes on the config instead of tagging after the run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Follow-up to the provenance/coverage stack (#79–#82, now merged). Two commits on top of
main.What & why
Coverage (
TargetDesign) matches on run attributes — what a run is about. Until now you set those with aset_attributes(run_hash, ...)call after dispatch, which meant reaching for the run's hash post-run and doing a separate tagging step. This lets you declare intent where it belongs — on theJobConfig:Those attributes are forwarded to the registry at registration time (right after
register_run), in both the batch (SweepManager) and adaptive (strategies.py) dispatch paths. Coverage matches the momentrun()returns — no post-run tagging.Design notes:
config_parameters; the config never learns whichRequirementit fulfills.Requirementmatching was deliberately not wired into config parameters.attributessurvivesto_dict/from_dict/to_yaml, so YAML-defined jobs carry intent too (more thanlabelgets today).set_attributesremains for amending a run after the fact.Also here
target-designs.qmdreworked to declare attributes on the config instead of tagging after the run (freeze regenerated against the real jar).manager.job_set.jobs[0]; it iterates theSweepResultreturned byrun().Tests
test_jobs.py: attributes default/round-trip (dict + YAML), expander propagation (per-job copy, not shared ref).test_provenance_integration.py: real-jar test proving config-declared attributes persist through dispatch and satisfy aTargetDesignwith zero tagging calls.🤖 Generated with Claude Code