Sync main with 0.7.1 branch and fix update notes parsing#20
Merged
Conversation
Restore normal visible chronicle refreshes so ongoing games do not leave the current era stuck while the advisor keeps updating. Refresh the current-era teaser after meaningful event growth or notable events, while keeping hidden background catch-up on the cheaper chapter-only path. Add backend regression tests and Electron end-to-end coverage for the stale-chronicle and hidden-resume refresh flows.
Add a Chronicle refresh mode setting with Balanced as the free-tier default and Enhanced as the higher-spend option for users who want more responsive current-era updates. Gate automatic current-era generation on the Chronicle tab being active and the app being visible so the renderer no longer spends teaser calls while the user is on Advisor or Settings. Hidden/background refreshes still use chapter-only catch-up. Thread the selected refresh mode through Electron IPC into the chronicle API so the backend can vary current-era regeneration thresholds per request without restarting the backend. Balanced keeps the current 3-event routine threshold while Enhanced refreshes after a single new routine event; notable events still bypass the routine threshold. Expand backend and Electron coverage for the new behavior, including tab-gating, hidden resume flow, Enhanced mode cadence, and API concurrency compatibility after the new chronicle request shape.
Reduce normal chapter cadence to 30 years and era-ending cooldown to 2 years. Keep colony and military power changes in chapter context, but stop them from forcing immediate current-era rewrites on their own.
Move the chronicle refresh selector out of the crowded header controls and present Balanced and Enhanced as an in-panel toggle within Gemini model access. Keep the setting wired through the existing save flow and update Electron end-to-end coverage so the new control is exercised when validating refresh-mode behavior.
Update the packaged app and Python project metadata to 0.7.0 so the stable Electron release workflow publishes the correct versioned artifacts and updater manifests for this release.
Correct war battle stats to count only battles where the player empire directly participated instead of attributing coalition-wide engagements to the player. This prevents advisor summaries from reporting wins or losses that belong to allies or subjects rather than the player empire. Replace suffix-based megastructure construction detection with live save-state checks based on build queue and upgrade data. This fixes completed stage-suffixed megastructures such as Grand Archive-style or other late-game structures being reported as still under construction. Add focused regression tests for coalition-only battle scenarios, dict-based battle participants, and completed stage-suffixed megastructures. Also add an integration test that derives expected player battle stats from raw war entries in a real save and verifies SaveExtractor.get_wars() matches that raw participation data.
Stop inferring megastructure lifecycle state from numeric type suffixes in the history pipeline. Preserve the literal suffix as raw stage metadata in snapshot signals, but treat status as the authoritative source for whether a megastructure is under construction, complete, restored, or ruined. Update event detection to emit megastructure lifecycle events from status transitions, including construction completed, restored, and ruined, while retaining stage-based upgrade events only for genuine numeric stage increases. This lets single-stage structures such as Grand Archive-style entries produce correct completion events even when their type suffix never changes. Mark the new megastructure lifecycle events as notable chronicle inputs and add regression coverage across signals, events, and chronicle tests to lock in the new semantics.
Prefer compiled cumulative snapshots when loading patch mechanics for the advisor, while keeping cumulative fallback behavior for later deltas. Add a current-state 4.3 Cetus snapshot, extend the live stress harness for versioned 4.3 checks, and cover snapshot loading with focused tests. Also tighten prompt guidance around naval capacity wording and document the snapshot workflow for future patch updates.
Add conservative naval capacity analysis with confidence flags so the advisor can distinguish confirmed and estimated cap states without leaving the normal advisor path. Add focused tests for the extractor and advisor policy behavior, and ignore local scratch artifacts used during investigation.
Update the Python and Electron package metadata for the 0.7.1 release so tagged builds publish the correct app version and updater manifests.
Owner
Author
|
Reviewed locally before merge: I rechecked the updater note parsing, chronicle refresh wiring, and naval-capacity guidance paths, and I did not find a blocking issue. Required GitHub checks are green, and local ruff/pytest/cargo validation also passed. |
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.
Description
Sync
mainwith the already releasedv0.7.0/v0.7.1branch work and include the follow-up updater release-notes parsing fix.This brings chronicle refresh mode and pacing improvements, event/player/megastructure extraction fixes, expanded tests, and the update dialog parsing fix into
main.Related issue
N/A
Priority alignment
mainback in sync with the already shipped0.7.xbranch and adds a follow-up stability fixDLC impact
Platform validation
Regression risk
Chronicle refresh cadence and updater release-note rendering changed. Local validation passed with
ruff,pytest tests/ -v --tb=short,cargo fmt --check,cargo clippy -- -D warnings,cargo test, andcargo build --release. I did not do a fresh manual Windows/Linux run in this pass.Type of change
Checklist
pytest tests/)cd stellaris-parser && cargo build --release)