Simplify the staged Core pipeline#68
Merged
Merged
Conversation
Inventory the current QE-specific contracts and document coordinated target validation, resource selection, unit handling, and generation while preserving the fixed pipeline and data-only request boundary. Closes #55.
Preflight generated paths, refuse existing destinations, stage complete output, and publish with no-replace semantics. Record SHA-256 hashes for exact generated bytes.
Remove the unsupported accuracy control, expose vdW CLI hints, and reject local-model metadata without its backend. Implements #52.
This was referenced Jul 16, 2026
This was referenced Jul 17, 2026
Organize unit, integration, and physics coverage, add branch coverage and focused mutation testing, and enforce both locally and in CI.
Use frozen dependency resolution, explicit timeouts, coverage artifacts and mutation summaries, plus a parallel distribution build that verifies required package data.
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Author
Blocked on PR #50This PR is stacked on #50 and should remain targeted at Once #50 merges:
Until then, this PR is blocked and has been returned to draft status. Written by an agent on behalf of Willow. |
sigilmakes
marked this pull request as draft
July 17, 2026 12:42
Remove storage-system bundle machinery, operational stage traces, exact runtime reconstruction, artifact hashing, speculative target architecture, and tests for deliberately corrupted internal state. Keep useful QE generation, scientific provenance, integration and physics coverage, and focused quality gates.
junwen94
marked this pull request as ready for review
July 21, 2026 12:29
Collaborator
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.
Note
This PR is stacked on #50 and intentionally targets
feat/qrf-kpoints-reland. After #50 merges, retarget this PR tomainand rerun checks.Summary
Goldilocks Core turns a structure and calculation intent into DFT recommendations and generated input files. This PR provides a staged, composable workflow for that process:
The built-in workflow currently generates Quantum ESPRESSO SCF input. Its stages and data contracts are reusable by future calculation types, including workflows that generate several linked files.
Pipeline API
CoreJobRequestis the serializable description of a job.Pipelinecontains the Python callables used to process it.The standard public functions are:
recommend()for structure analysis, parameter advice, k-points, and resource selection;generate()for recommendations plus generated input files;write_bundle()for generated files plus a portable manifest directory.Each stage is also a normal public Python function. Callers can run stages directly, inspect intermediate records, insert project-specific work, or compose a different sequence.
Any
Pipelinefield can be replaced with a compatible callable. For example, a calculation-specific generator can reuse the built-in scientific stages:Generate returns a tuple of
GeneratedFilerecords, allowing one task to produce files such asscf.inandnscf.intogether.Scientific recommendations
The workflow provides provenance-backed recommendations for:
Structure analysis reports facts separately from advice. Select resolves advice into concrete k-points, pseudopotentials, and cutoffs. Generate translates completed decisions into target-code syntax.
QRF k-point model
The default Kmesh backend loads the configured Quantile Random Forest lazily. Model and metallicity artifacts can come from Hugging Face or local paths, and an alternate TOML registry can replace the packaged configuration.
Explicit
k_gridandk_spacinghints bypass model loading. Model-loading and prediction errors propagate directly to the caller. A model-free path is available explicitly through--heuristic-kpointsorPipeline(kmesh=resolve_kpoints_from_advice).Successful predictions record the model identity, confidence, predicted interval, and selected mesh in provenance.
Quantum ESPRESSO generation
The built-in generator supports Quantum ESPRESSO SCF single-point input. It renders:
Pseudopotential metadata is treated as external input. Missing or invalid cutoffs remain unavailable and produce actionable warnings. Generation requires complete selections for every structure element and checks the values it places into QE syntax.
Bundle mode writes generated files and a deterministic
manifest.jsonto a new directory. Paths are confined to the bundle root, and existing destinations, duplicate paths, and manifest collisions are rejected.Test framework
Tests are organized into three layers:
CI reports branch coverage and runs focused mutation testing with mutmut against deterministic scientific and generation modules. The mutation gate currently requires a 74% score; the current suite scores 74.5% (919/1234 mutants killed).
CI also checks Ruff linting and formatting, builds the wheel and source distribution, and validates packaged data and importability.
Verification
Closes #41.
Closes #43.
Closes #52.
Closes #54.
Closes #56.
Written by an agent on behalf of Willow.