Skip to content

docs: the glossary defines answers, sweeps, relations and assumptions, and no longer shows build taking a Program - #1730

Merged
FBumann merged 1 commit into
mainfrom
claude/glossary-update
Sep 25, 2026
Merged

FBumann merged 1 commit into
mainfrom
claude/glossary-update

Conversation

@FBumann

@FBumann FBumann commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Prompt: Look into our glossary. I think It needs some updates.

Note

The following content was generated by AI.

The glossary was last touched at alpha.334 (#1647), and several releases since then made it wrong. The worst case is the chain diagram, which drew check ──▶ Program ──▶ build, but build now refuses a Program. This PR fixes what is wrong and defines the terms the docs use without defining them. It is the first of five stacked PRs; the four renames build on it.

What changed

Wrong, now fixed

  • The chain diagram now runs spec → build → Model → solve → Result, with check → Program as a side branch for reading the plan. The Spec and Program entries say to keep the Spec (lanes.py refuses a Program).
  • Result listed evaluate(name). It takes an expression.
  • Model called row(...) and diagnostics() sinks. They read the model; they don't solve it.
  • Tables was missing qmatrix.
  • The verbs section was missing evaluate, one of the five verbs the architecture page lists.
  • Buildable is Mapping, not dict.

Added

  • Answer, used about 400 times in src/ and docs/.
  • A Sweeps section: axis, slice, key, the sweep's answer type, carry. solve_over and held/spilled move into it.
  • Relation, Assumption, Formulation, Digest, a sink's capability, and check(spec, sink).

Checked: every new link points to a heading that exists. The site build was not run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VgkRT9Kpb2iNvL6dpV8VER


Generated by Claude Code

@codspeed

codspeed Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

🆕 24 new benchmarks
⏩ 82 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_emit[commitment-s-specsolve-highs] N/A 2 MB N/A
🆕 test_emit[commitment-s-specsolve-lp] N/A 2.6 MB N/A
🆕 test_emit[dispatch-s-specsolve-highs] N/A 12.4 MB N/A
🆕 test_emit[dispatch-s-specsolve-lp] N/A 18.1 MB N/A
🆕 test_emit[fleet-s-specsolve-highs] N/A 21.9 MB N/A
🆕 test_emit[fleet-s-specsolve-lp] N/A 26.2 MB N/A
🆕 test_emit[nodal-s-specsolve-highs] N/A 4.9 MB N/A
🆕 test_emit[nodal-s-specsolve-lp] N/A 5.9 MB N/A
🆕 test_emit[profiled-s-specsolve-highs] N/A 21.1 MB N/A
🆕 test_emit[profiled-s-specsolve-lp] N/A 24.3 MB N/A
🆕 test_emit[sector-s-specsolve-highs] N/A 5.3 MB N/A
🆕 test_emit[sector-s-specsolve-lp] N/A 5.3 MB N/A
🆕 test_emit[storage-s-specsolve-highs] N/A 16.9 MB N/A
🆕 test_emit[storage-s-specsolve-lp] N/A 21.7 MB N/A
🆕 test_emit[transport-s-specsolve-highs] N/A 15.7 MB N/A
🆕 test_emit[transport-s-specsolve-lp] N/A 19.9 MB N/A
🆕 test_window[commitment-s-specsolve-highs] N/A 1.6 MB N/A
🆕 test_window[dispatch-s-specsolve-highs] N/A 11.3 MB N/A
🆕 test_window[fleet-s-specsolve-highs] N/A 17.4 MB N/A
🆕 test_window[nodal-s-specsolve-highs] N/A 4.7 MB N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing claude/glossary-update (1f3d1d1) with main (85ebcd2)2

Open in CodSpeed

Footnotes

  1. 82 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (50c976e) during the generation of this report, so 85ebcd2 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@read-the-docs-community

read-the-docs-community Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 lpspec | 🛠️ Build #34745128 | 📁 Comparing 1f3d1d1 against latest (ecf1019)

  🔍 Preview build  

3 files changed
± about/changelog/index.html
± reference/glossary/index.html
± examples/pypsa_ladder/rung_10_quadratic_costs/index.html

@read-the-docs-community

read-the-docs-community Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 specsolve | 🛠️ Build #34745129 | 📁 Comparing 1f3d1d1 against latest (ecf1019)

  🔍 Preview build  

3 files changed
± about/changelog/index.html
± reference/glossary/index.html
± examples/pypsa_ladder/rung_10_quadratic_costs/index.html

@FBumann
FBumann added this pull request to stack #1735 September 24, 2026 14:02
@FBumann
FBumann force-pushed the claude/glossary-update branch from 0bb5762 to f81748f Compare September 24, 2026 17:35
…, and no longer shows build taking a Program

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VgkRT9Kpb2iNvL6dpV8VER
@FBumann
FBumann force-pushed the claude/glossary-update branch from f81748f to 1f3d1d1 Compare September 24, 2026 18:57
@FBumann FBumann added the docs Documentation pages, guides, reference and README label Sep 24, 2026 — with Claude
@FBumann
FBumann merged commit 25d594b into main Sep 25, 2026
16 checks passed
@FBumann
FBumann deleted the claude/glossary-update branch September 25, 2026 06:07
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.354](v0.0.1-alpha.353...v0.0.1-alpha.354)
(2026-09-25)


### Refactoring

* **api:** a sweep's answer is a Sweep, read back with load_sweep and
scan_sweep ([#1732](#1732))
([24b1238](24b1238))
* **api:** how each slice of a sweep terminated is runs.record, saved as
record.parquet, so objective always means the number
([#1731](#1731))
([7c14833](7c14833))


### Documentation

* the glossary defines answers, sweeps, relations and assumptions, and
no longer shows build taking a Program
([#1730](#1730))
([25d594b](25d594b))

---
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>
FBumann added a commit that referenced this pull request Sep 25, 2026
…#1738)

> **Prompt:** In the records change, does each Result and Runs also have
a .record property? … Add it

> [!NOTE]
> The following content was generated by AI.

`result.record` returns the `Record` that `save()` writes to
`record.parquet`: one row of the table a sweep keeps as `sweep.record`,
under the same name one dimension wider. Before this, `Result` exposed
only the separate fields, and the `Record` value existed only inside
`save()`. `save()` now builds its row from the property, so the row has
one home.

<details><summary>Details, mutation table and verification</summary>

**Behaviour**
- `result.record` computes `model_digest()` on first use, as `save()`
already did. The digest is cached, so later reads are free.
- An answer read back with `load_result` or `load_archive` now keeps the
`run` its record was stamped with. Before, `spec_digest`, `solved_at`
and `model_digest` were carried over, but `run` was dropped. So
`load_archive(...).answer.record` equals the row on disk.
- `save()` still writes `run` as null. A plain save is not an archive,
and `Record` documents `run` as "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 a `load_result`
of that file must all give one row, and `objective` must be null exactly
where nothing was reached.
- `test_an_archive_stamps_its_own_name_and_when_the_solve_returned` also
checks that an archived answer carries its `run`, and that re-saving it
plainly writes `run` as null.

**Mutation table** (committed tree, restored with `git checkout --`,
`__pycache__` dropped on both sides)

| guard | result |
|---|---|
| `load_result` carries `run` (`api.py:673`, via `tools/mutate.py`) |
**caught** |
| `save()` writes `run` as null (`result.py:791`: `._replace(run=None)`
removed, by hand) | **caught** |

**Gates:** `ruff check`, `ruff format --check`, `pyrefly check`, the
full suite (4033 passed, 319 skipped, 1 xfailed) and
`bench/test_harness.py` (151 passed), in a `uv` environment. After
#1730–#1734 merged, GitHub rebased this branch onto `main`; the
resulting tree is identical to the one those gates ran on.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01VgkRT9Kpb2iNvL6dpV8VER

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation pages, guides, reference and README

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants