← Back to Pull requests

feat: egress tracking commands and a shared journal and reporter #92

Open
unknown opened this pull request with 194 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 18, 2026 15:38 UTC
Author

The first step of the Ingot egress tracking RFC: the commands and the shared machinery that Ingot, and later Piri, will use to report what they serve to the egress tracking service.

  • Commands. Adds /content/serve, which a gateway invokes on itself for each read it serves. Its receipt carries two counts: the stored bytes of the blob that were read, and the bytes sent to the client, which differ for an encrypted blob. The tracking commands drop the /space prefix left over from UCAN 0.9 and become /egress/track and /egress/consolidate; the second is new here.

  • Journal. A new egress package appends each receipt, with its invocation and proofs, to a batch on local disk. A batch is sealed at 100 MiB or after an hour, and is a CAR file in which each delegation appears once.

  • Reporting. Each sealed batch is submitted to the tracker, and removed once the tracker's consolidation receipt has arrived and its total has been compared with the batch's own.

  • Serving batches. An HTTP handler serves a sealed batch by CID for the tracker to fetch.
  • This is a breaking change for the delegator and smelt, which import the tracking commands from their old package path.

    A batch the tracker fails to consolidate is submitted again on every pass, with no limit, so the tracker must count a batch once however many times it is submitted.

    refs https://app.shortcut.com/filone/story/108/trial-egress-cap-works-in-forge-regions

    🤖 Generated with Claude Code

    Diff: 194 lines (+145 / -49) across 2 files Reviewer: alanshaw Review duration: 6029m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 194 lines diff across 2 files
    0.36
    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%
    46%
    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.315
    Real PR Conversation Timeline
    1 comments
    "Review active on #92"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 36% (MEDIUM) · Higher = larger blast radius
    36%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 19.2% · Safe to merge
    19.2%