Skip to content

Spec 24 sprints 3-5: console forecast-sharing UI (clean)#18

Open
ilabra-axo wants to merge 3 commits into
mainfrom
spec24-console-sharing-clean
Open

Spec 24 sprints 3-5: console forecast-sharing UI (clean)#18
ilabra-axo wants to merge 3 commits into
mainfrom
spec24-console-sharing-clean

Conversation

@ilabra-axo

Copy link
Copy Markdown

Clean replacement for #17, which got polluted: the parallel World-Cup agent pushed its forecast revisions + a recompose mutex group feature onto that shared branch. This branch contains only the console forecast-sharing work — two commits on top of main:

  1. spec 24 sprints 3-5: console forecast-sharing UI — client wrappers, Teams panel, cockpit + portfolio Access panels, commit-sheet rewrite (drops the dishonest "team" tile), row badges, and the Inbox.
  2. fix: surface commit-sheet share failuresapply_publish_shares previously swallowed errors (let _ = …await), so a share failing mid-commit (e.g. a transient Railway 502) left the forecast published but grants silently dropped. Now logs failures, sets publish status to "Published, but N/M share(s) failed: …", and toasts.

Validation

  • cargo build -p fermi-console clean; client unit tests pass.
  • Server contract 38/38 against live Neon (forecast_acl); manual share create→list→revoke round-trip through live Railway (201/200).
  • The original "didn't share" report was a transient Railway 502, not a client bug.

🤖 Generated with Claude Code

apply_publish_shares used `let _ = api...await`, so a failed share/invite
during commit (e.g. a transient Railway 502) left the forecast published
but the grants silently dropped — the "I shared and nothing happened with
no error" failure mode. Now track per-target outcomes, log failures, set
publish_status to "Published, but N/M share(s) failed: …", and emit a
toast. Success path toasts "Shared with N".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ilabra-axo! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@ai-coding-guardrails ai-coding-guardrails Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! 😎

I didn't find anything of concern

Skipped files due to being too large for us to review

If you don't need these files reviewed, consider excluding them from the review.

If you do need them reviewed, consider breaking them into smaller files.

Risk: 🟢 Low

Risk analysis

No code changes are present in this pull request, as indicated by zero files changed and zero lines of code changed. Therefore, there is no forward-looking impact on any of the rubric dimensions.

Did you know we can integrate this feedback directly into 50+ IDEs? Get setup in just one command

@ai-coding-guardrails ai-coding-guardrails Bot added the zenable/risk:low Zenable assessed this PR as LOW risk. label Jun 25, 2026
labrastudio and others added 2 commits June 25, 2026 19:54
ABW is shared substrate, so GET /api/teams returns every vertical's teams
— the console was showing rabble swarms, kask workspaces, etc. Scope the
Teams panel to fermi_forecast:

- console: filter the teams list via is_fermi_team(); tag console-created
  teams with origin="fermi_forecast" (create_team_handler already accepts
  it). The filter is strict on `origin` when present, with a slug/description
  heuristic fallback so it also cleans up against API builds that don't yet
  return origin.
- fermi-auth: get_user_teams / get_team / create_team now SELECT and return
  teams.origin (added to the Team struct, serde-default). Takes effect for
  the strict filter on the next ABW deploy; the console heuristic covers the
  interim.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…asts

The cockpit had no view of a forecast's server-side status, so an
eliminated/resolved forecast (e.g. a World-Cup team knocked out) still
looked editable — you could run a sim and hit save, only for the write to
silently fail server-side. The operator shouldn't have to carry "this team
is out" in their head.

- CockpitState tracks authoritative forecast_status / outcome / resolution
  note, populated on open_forecast.
- reconcile_forecast(): re-GETs the forecast and adopts the settled state +
  resolved probability. Runs on cockpit re-entry, on a stale-save 409, and
  via a manual ↻ Reconcile button.
- run_simulation / publish_forecast refuse when locked (resolved/void) with
  the authoritative reason instead of failing opaquely.
- A locked banner shows the outcome, resolution note, settled probability,
  and the Reconcile button.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ilabra-axo pushed a commit that referenced this pull request Jun 30, 2026
…cher trajectory events

Console-only fixes layered on the WC recompose feature (so they live on the
main line, not the isolated sharing PR which lacks that base).

#1 sim/save value jump: a just-run sim's raw mean is provisional until the
server recomposes mutex-group eliminations. Mark `recomposing`, block save
until it settles (so save can't disagree with the sim), and post a
"Recomposed: standalone X% → Y% (eliminations priced in)" message.

#4 Sobol indices: the sensitivity bars rendered raw p95−p5 spread (≈uniform
for a factor model), never the computed Sobol indices. Store per-driver
total_order_index each sim and drive the bars from it (relabeled "Driver
influence (Sobol total-order)"); spread is now only the pre-sim fallback.

#5 trajectory event richness: BayesOps fit events now surface effective-n
and 90% CI (collected but previously hidden), so a staged vs auto-accepted
decision shows its statistical rationale.

Also carries the cockpit reconcile/lock work (already on PR #18) since it
shares the same working tree.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

zenable/risk:low Zenable assessed this PR as LOW risk.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants