Skip to content

fix(api,web): resolve dismissal cleared field, ended header tense, and unobservable ends - #358

Merged
gcko merged 1 commit into
mainfrom
fix/nothing-dies-quietly-reconciliation
Sep 16, 2026
Merged

gcko merged 1 commit into
mainfrom
fix/nothing-dies-quietly-reconciliation

Conversation

@gcko

@gcko gcko commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Reconciliation and bug fixes for three issues in the "Nothing dies quietly" milestone:

  1. DRC-4179:

    • In cargento_runtime/dismissals.py: reject Claude session IDs longer than 8 characters (len(sid) > 8) so unmatchable scripted keys (such as 36-character UUIDs) are not admitted into the LRU or allowed to evict legitimate dismissals. Drop unmatchable entries on load.
    • In cargento_runtime/http_api.py: drop the obsolete cleared response field from POST /api/dismiss. The response contract is strictly {"ok": True, "persisted": bool}.
  2. DRC-4554:

    • In cargento_runtime/web/next-session.js: session header description yields present-tense state phrases ("awaiting your message") and active duration phrases to an observed session end ("ended X ago").
  3. DRC-4555:

    • In cargento_runtime/aggregate.py: publish ends_observable boolean flag in collect() payload indicating whether the session-ends store is observable.
    • In cargento_runtime/web/next-observed.js: update coverage gates to display "ends unobservable" when payload.ends_observable === false, while preserving "ends observed on N sessions" when observable.

Test plan

  • Ran the pre-PR suite in AGENTS.md Pre-PR Checks (ruff, ruff format, mypy, lint_embedded.py, validate_plugins.py, bump_version.py --current, behavior-focused dashboard tests under coverage via discovery) and it is clean. A prose-only diff is not exempt: the validate check is unfiltered and runs the same tests
  • Preserved Python 3.11 compatibility; CI's runtime-floor job launches the shipped entry point on that floor
  • Invoked the sync-docs skill: no docs drift introduced
  • Behavior changes to server.py or cargento_runtime/ include a regression test
  • No version field was touched (version-guard fails any PR that bumps one)
  • Commits are signed off (git commit -s, DCO)
  • Verified native validators (claude plugin validate ./cargento --strict and agy plugin validate ./cargento)

…d unobservable ends

- dismissals: reject Claude session IDs longer than 8 characters to prevent unbounded unmatchable keys from evicting legitimate dismissals.
- http_api: remove the obsolete cleared field from the POST /api/dismiss response payload.
- next-session.js: yield present-tense state phrases and active duration to observed session ends in session meta header.
- aggregate and next-observed.js: report ends unobservable when the session-ends store is not observable.
- tests: update byte oracle pins and add unit coverage across dismissals, http_api, next_session, next_observed, and next_attention.

Fixes DRC-4179, DRC-4554, DRC-4555.

Signed-off-by: Jared Scott <jared.scott@variable.team>
@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Name                                                                  Stmts   Miss Branch BrPart  Cover
-------------------------------------------------------------------------------------------------------
cargento/skills/cargento/agy_hook.py                                     79     14     28      7  78.5%
cargento/skills/cargento/cargento_runtime/__init__.py                     0      0      0      0 100.0%
cargento/skills/cargento/cargento_runtime/aggregate.py                  323      3    110      3  98.6%
cargento/skills/cargento/cargento_runtime/annotations.py                373     19    130     21  92.0%
cargento/skills/cargento/cargento_runtime/asks.py                       110      0     28      0 100.0%
cargento/skills/cargento/cargento_runtime/claude_data.py                340     40    158     18  88.4%
cargento/skills/cargento/cargento_runtime/cli.py                        212     20     52      6  89.4%
cargento/skills/cargento/cargento_runtime/collectors/__init__.py          0      0      0      0 100.0%
cargento/skills/cargento/cargento_runtime/collectors/antigravity.py     423     41    174     25  87.3%
cargento/skills/cargento/cargento_runtime/collectors/claude.py          305     17    112     15  91.8%
cargento/skills/cargento/cargento_runtime/collectors/codex.py           258     18     96     15  90.7%
cargento/skills/cargento/cargento_runtime/collectors/copilot.py         153      4     52      2  97.1%
cargento/skills/cargento/cargento_runtime/collectors/cursor.py          287     19    108     16  90.6%
cargento/skills/cargento/cargento_runtime/collectors/droid.py            34      3      6      1  90.0%
cargento/skills/cargento/cargento_runtime/collectors/gemini.py           54      7     16      4  84.3%
cargento/skills/cargento/cargento_runtime/collectors/goose.py            95      6     28      4  91.9%
cargento/skills/cargento/cargento_runtime/collectors/opencode.py        124      4     44      4  95.2%
cargento/skills/cargento/cargento_runtime/collectors/pi.py              328     34    152     20  88.8%
cargento/skills/cargento/cargento_runtime/config.py                     232      1     20      1  99.2%
cargento/skills/cargento/cargento_runtime/deliveries.py                 128     12     30      7  88.0%
cargento/skills/cargento/cargento_runtime/departures.py                 131      6     30      6  92.5%
cargento/skills/cargento/cargento_runtime/diagnostics.py                 88      3     26      3  94.7%
cargento/skills/cargento/cargento_runtime/dismissals.py                 111      3     32      3  95.8%
cargento/skills/cargento/cargento_runtime/ends.py                        89      5     18      0  95.3%
cargento/skills/cargento/cargento_runtime/events.py                     230      1     86      3  98.7%
cargento/skills/cargento/cargento_runtime/focus.py                       72      2     20      2  95.7%
cargento/skills/cargento/cargento_runtime/git_status.py                  59      1     22      2  96.3%
cargento/skills/cargento/cargento_runtime/history.py                    206      9     56      7  93.9%
cargento/skills/cargento/cargento_runtime/http_api.py                   933    107    300     37  88.3%
cargento/skills/cargento/cargento_runtime/interaction_prototype.py      709    219    198     38  65.9%
cargento/skills/cargento/cargento_runtime/io.py                         163      2     38      1  98.5%
cargento/skills/cargento/cargento_runtime/irreversible.py                39      0      6      0 100.0%
cargento/skills/cargento/cargento_runtime/lifecycle.py                  412     47    140     14  87.5%
cargento/skills/cargento/cargento_runtime/notifications.py              264     12     92      7  94.7%
cargento/skills/cargento/cargento_runtime/observation.py                412      6    122      3  98.3%
cargento/skills/cargento/cargento_runtime/observer.py                   388     24    156     15  92.8%
cargento/skills/cargento/cargento_runtime/probe.py                       44      0     18      1  98.4%
cargento/skills/cargento/cargento_runtime/project_context.py           1588    179    686    121  85.3%
cargento/skills/cargento/cargento_runtime/quota.py                      392      7    144      6  97.2%
cargento/skills/cargento/cargento_runtime/reach.py                       78      6     30      4  90.7%
cargento/skills/cargento/cargento_runtime/reading.py                    365      7    122      6  97.3%
cargento/skills/cargento/cargento_runtime/records.py                    265      5    118      9  96.3%
cargento/skills/cargento/cargento_runtime/semantic_history.py           290     14    110     18  92.0%
cargento/skills/cargento/cargento_runtime/sessions.py                   189      4     72      4  96.9%
cargento/skills/cargento/cargento_runtime/snapshot.py                    36      0      4      0 100.0%
cargento/skills/cargento/cargento_runtime/spacedock.py                  510     50    260     26  89.9%
cargento/skills/cargento/cargento_runtime/state.py                       83      0      2      0 100.0%
cargento/skills/cargento/cargento_runtime/stream.py                      57      0      8      0 100.0%
cargento/skills/cargento/cargento_runtime/transcripts.py                529     29    272     25  93.3%
cargento/skills/cargento/cargento_runtime/tripwires.py                  232     14     94     13  91.7%
cargento/skills/cargento/cargento_runtime/turns.py                      209     11    104     12  92.7%
cargento/skills/cargento/cargento_runtime/unasked.py                    119      2     34      1  98.0%
cargento/skills/cargento/cargento_runtime/web/__init__.py                 0      0      0      0 100.0%
cargento/skills/cargento/cargento_runtime/web/page.py                    38      0     10      0 100.0%
cargento/skills/cargento/event_hook.py                                  213     54     92     14  68.5%
cargento/skills/cargento/mcp_server.py                                  377     22    112     14  92.2%
cargento/skills/cargento/notify_hook.py                                  49     15      6      1  67.3%
cargento/skills/cargento/server.py                                        3      0      2      1  80.0%
cargento/skills/cargento/statusline_hook.py                             131     13     46      8  87.0%
scripts/bench_collect.py                                                211     10     54      6  94.0%
scripts/bench_event_latency.py                                           67     21     14      1  67.9%
scripts/bump_version.py                                                  60     12     24      5  77.4%
scripts/capture_focus_raise.py                                          729    131    236     16  79.4%
scripts/capture_hook.py                                                 292     30     90     11  88.7%
scripts/capture_team_registry.py                                        172     33     48      6  80.5%
scripts/capture_terminal_identity.py                                    347    108    104     14  66.3%
scripts/derive_prompt_shapes.py                                         210     16     88     14  89.3%
scripts/lint_embedded.py                                                 97      3     32      3  95.3%
scripts/mark_abstention.py                                              382    142    140     23  58.4%
scripts/score_abstention.py                                             493     52    182     18  88.4%
scripts/serve_operator_cockpit.py                                       448    191    112     20  54.5%
scripts/validate_plugins.py                                             762    202    434     67  70.8%
-------------------------------------------------------------------------------------------------------
TOTAL                                                                 18231   2092   6590    798  86.6%

Threshold: fail_under in pyproject.toml · label coverage-exception to bypass (visible in PR timeline).

@gcko
gcko merged commit 946c2e6 into main Sep 16, 2026
12 checks passed
@gcko
gcko deleted the fix/nothing-dies-quietly-reconciliation branch September 16, 2026 03:10
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.

1 participant