← Back to Pull requests

(feat) daemon: poll one account on demand #1539

Open
unknown opened this pull request with 271 lines diff across 3 files
View on GitHub
unknown unknown commented on Oct 03, 2026 03:44 UTC
Author

After resetting a parked account's quota, its exhausted slow-poll window can retain the old usage for an hour. Add sessiometer poll <account> to re-read that account immediately through the running daemon.

The command accepts a roster label or UUID, clears quota slow-polling, retains provider backoff, and waits for a redacted result from the authenticated control socket. The daemon logs forced_poll, records the normal usage sample, and applies its existing rotation policy. The forced tick preserves the scheduled poll cursor and publishes its snapshot without issuing an unrelated second poll. poke remains the credential-refresh command.

Validation:

  • Full local gate: formatting, clippy with warnings denied, rustdoc with warnings denied, build, and cargo test --verbose: 2,392 passed, 14 ignored.

  • Source gate: no Security.framework linkage; all four unfiltered documentation guards passed.

  • Tests cover slow-window clearing and resumed cadence; unknown/ambiguous targets, quarantine and provider backoff; failed forced poll; authenticated socket handoff/result; CLI help and argument count. Exhaustive help/prose and account-handle registrations remain intact. The new poll stamp is covered by the UUID re-key fingerprint and observation-only guard.

  • Local cargo run -- poll acct-11 against installed daemon HEAD-49561e8 reports unsupported poll result. This daemon cannot exercise the new command without an upgrade. No installation or launchd configuration changed.

  • MSRV 1.87 and cargo-deny supply-chain checks require toolchains/tools absent locally and are delegated to upstream CI.
  • Risk: low. Same-user socket mutation; provider backoff remains authoritative. The daemon's normal rotation policy can act on the fresh reading. No new configuration or status schema changes.

    QA convergence: the same shared gpt-6.1-sol high reader reviewed both passes at their exact heads. Pass 1 found two correctness defects; both have failing-then-passing regressions. Pass 2 at 10bde738753852f42e9afc13bfe34c1c76e67d8e found zero findings. Deadline and RNG preservation received source review.
    <!-- shipyard: task=task_8606d503d8ea2c879641830c -->

    Diff: 271 lines (+203 / -68) across 3 files Reviewer: alexey-pelykh Review duration: 73654m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.51) × (1 − Review Confidence (0.41)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.51 · 271 lines diff across 3 files
    0.51
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    40%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.335
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #1539"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 40.9% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 51.5% (MEDIUM) · Higher = larger blast radius
    51.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 40.9% · Lower = rushed or shallow review
    40.9%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 30.4% · Safe to merge
    30.4%