Skip to content

fix: the solve page finds a scenario's sources in archives that specsolve 0.8 and later write - #10

Merged
FBumann merged 2 commits into
mainfrom
fix/solve-source-names
Oct 12, 2026
Merged

FBumann merged 2 commits into
mainfrom
fix/solve-source-names

Conversation

@FBumann

@FBumann FBumann commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Prompt: (a screenshot of the live Solve page: "The solve did not run: Error: https://fluxopt.github.io/specsolve-showcase/archive/runs/base/sources.parquet answered 404")

Note

The following content was generated by AI.

The Solve page (#9) named a scenario's sources from the archive's sources.parquet. fluxopt/specsolve#1913 removed that file, so every live scenario failed with a 404. The page now takes the sources/<name>.parquet paths from the archive's catalog.parquet.

Cause, fix, and what was verified

Cause. #9 was tested against archives written with specsolve 0.6.2, which still wrote sources.parquet. The showcase writes with 0.8.1 since fluxopt/specsolve-showcase#18. In 0.8.1 an archive no longer digests its sources (fluxopt/specsolve#1913), so the file is gone. #9's description said the local archives were "as the live ones are". That was wrong.

Fix. loadQuestion in src/solver.ts reads the path column of the archive's own catalog.parquet, and keeps the paths under sources/. A catalog lists every source, dimensions included, in both layouts.

Verified, in headless Chromium with specsolve 0.9.0 from PyPI. The archives were the showcase's four scenarios, solved at its main (de8a389) with specsolve 0.8.1 and published with its tools.publish_archive, so they are in the live layout:

  • Reproduced first: app main at 5570c73 shows the same …/runs/base/sources.parquet answered 404.
  • With the fix: base and carbon_cap are optimal and match the published costs in all four periods.
  • Editor: base with solar's invest × 0.6 matches the published cheap_solar costs.
  • Refusal: a spec edited to dtype: integer shows specsolve's SchemaError.
  • Download: "Solve and download the archive" saves base-edited.zip. specsolve 0.9.0 reads it, and its objectives equal the published cheap_solar ones exactly.
  • npm run build passes.

Not tested: the live jsDelivr CDN and fluxopt.github.io are not reachable from here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AAz2z9GVsHSQypiTUZyrY9


Generated by Claude Code

…olve 0.8 and later write

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AAz2z9GVsHSQypiTUZyrY9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AAz2z9GVsHSQypiTUZyrY9
@FBumann
FBumann merged commit e7765e2 into main Oct 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants