Repository navigation
feat(api): a result hands back how its solve terminated as one Record - #1738
Merged
Merged
Conversation
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
FBumann
added this pull request to stack #1735
September 24, 2026 20:45
FBumann
force-pushed
the
claude/result-record
branch
from
September 24, 2026 21:06
2b7e25c to
ae83e5d
Compare
FBumann
added a commit
that referenced
this pull request
Sep 25, 2026
…aved as record.parquet, so objective always means the number (#1731) > **Prompt:** Also discuss some of the names, and if they have better alternatives — approved from the proposed list: "1. Yes". A later follow-up settled the attribute's number: "Runs.record or .records?" … "agree" (to `.record`). > [!NOTE] > The following content was generated by AI. `result.objective` is a float, but `runs.objective` was a table of how each slice terminated, and `objective.parquet` held a `Record`. That table is now `runs.record` and the file is `record.parquet`, matching the `Record` type and the `RECORD_FILE` constant. A spilled sweep's `objective/` directory is now `record/`. The attribute is singular to follow the sweep rule "`Result`'s readers, one dimension wider, under the same names", as `metrics` already does. `result.record` (#1738) is one `Record`, and the sweep's `record` is a table of one per slice, written as `record.parquet` beside `metrics.parquet`. This is a breaking change: an answer or archive saved before it is refused with "holds no 'record.parquet'". The layout stamp stays at 0, following its own rule ("zero while the layout is still moving"). This is stacked on the glossary PR. <details><summary>Verification</summary> `ruff check`, `ruff format --check`, `pyrefly check` and the full suite (4030 passed, 319 skipped, 1 xfailed), in a `uv` environment because `pixi` was not available. The tests that asserted the old names and file listings now assert the new ones; no coverage was dropped. The singular name was applied to this PR and every PR stacked on it by rebuilding each commit's tree with one scripted rename, and each rebuilt branch was re-run through the same gates. Every rebuilt commit differs from its original only on lines naming the record, apart from one line `ruff format` re-joined. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VgkRT9Kpb2iNvL6dpV8VER Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VgkRT9Kpb2iNvL6dpV8VER
FBumann
force-pushed
the
claude/result-record
branch
from
September 25, 2026 06:07
ae83e5d to
01fbfc2
Compare
fluxopt-release-bot Bot
added a commit
that referenced
this pull request
Sep 25, 2026
🤖 I have created a release *beep* *boop* --- ## [0.0.1-alpha.355](v0.0.1-alpha.354...v0.0.1-alpha.355) (2026-09-25) ### Features * **api:** a result hands back how its solve terminated as one Record ([#1738](#1738)) ([c6ffe74](c6ffe74)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: fluxopt-release-bot[bot] <307443024+fluxopt-release-bot[bot]@users.noreply.github.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.
Note
The following content was generated by AI.
result.recordreturns theRecordthatsave()writes torecord.parquet: one row of the table a sweep keeps assweep.record, under the same name one dimension wider. Before this,Resultexposed only the separate fields, and theRecordvalue existed only insidesave().save()now builds its row from the property, so the row has one home.Details, mutation table and verification
Behaviour
result.recordcomputesmodel_digest()on first use, assave()already did. The digest is cached, so later reads are free.load_resultorload_archivenow keeps therunits record was stamped with. Before,spec_digest,solved_atandmodel_digestwere carried over, butrunwas dropped. Soload_archive(...).answer.recordequals the row on disk.save()still writesrunas null. A plain save is not an archive, andRecorddocumentsrunas "stamped when the archive is written and null until then".Tests
test_a_result_hands_back_the_row_its_save_writes, parametrized over LP, MIP and INFEASIBLE. The property, the saved file and aload_resultof that file must all give one row, andobjectivemust be null exactly where nothing was reached.test_an_archive_stamps_its_own_name_and_when_the_solve_returnedalso checks that an archived answer carries itsrun, and that re-saving it plainly writesrunas null.Mutation table (committed tree, restored with
git checkout --,__pycache__dropped on both sides)load_resultcarriesrun(api.py:673, viatools/mutate.py)save()writesrunas null (result.py:791:._replace(run=None)removed, by hand)Gates:
ruff check,ruff format --check,pyrefly check, the full suite (4033 passed, 319 skipped, 1 xfailed) andbench/test_harness.py(151 passed), in auvenvironment. After #1730–#1734 merged, GitHub rebased this branch ontomain; the resulting tree is identical to the one those gates ran on.🤖 Generated with Claude Code
https://claude.ai/code/session_01VgkRT9Kpb2iNvL6dpV8VER