← Back to Pull requests

feat(inkless:storage): add per-role storage config overrides #879

Closed
unknown closed this pull request without merging on Nov 19, 2026 11:19 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 08:25 UTC
Author

The fetch, produce, and background storage clients all read the same storage. keys. FileCleaner DeleteObjects requests (up to 1000 keys) time out at the shared 2000 ms S3 call timeout, and a longer shared timeout would also loosen the produce and fetch paths.

InklessConfig.storage(metrics, role) now builds the settings of each client from three layers, lowest first: the role defaults, the shared storage. keys, and the storage.<role>. keys. The roles are fetch, produce, and background. The lagging fetch storage uses the fetch role.

The background role serves FileCleaner deletes and consolidation cold reads. It defaults to s3.api.call.timeout=30000, s3.api.call.attempt.timeout=10000, and gcs.read.timeout=10000. The fetch and produce roles keep the shared defaults. Azure Blob Storage has no timeout setting, so it has no role default.

Operator impact

  • New override keys: inkless.storage.<role>.<key>, for example inkless.storage.background.s3.api.call.timeout. An unknown role name is ignored.

  • Changed behavior: on S3 and GCS, background deletes and consolidation cold reads wait up to 30 s per call and 10 s per attempt (S3), or 10 s per read (GCS), instead of 2 s and 1 s. A hung call delays a FileCleaner cycle by up to that time.

  • An explicit inkless.storage.s3.api.call.timeout (or the GCS key) still applies to the background role. Set the inkless.storage.background. key to give it a different value.

  • Documented in the new "Object storage client settings" section of docs/inkless/PERFORMANCE.md.
  • Testing

  • InklessConfigTest: the background role gets the longer S3 and GCS defaults and produce does not. An explicit shared key replaces the role default, and an explicit role key replaces both. A role key overrides the shared key for that role only.

  • SharedStateTest: each client is created with its own role (fetch for both fetch clients, produce, background). The test fails if two roles swap. The existing close-order tests stub the two-argument storage().
  • Diff: 256 lines (+192 / -64) across 3 files Reviewer: viktorsomogyi Review duration: 1613m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.62) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.62 · 256 lines diff across 3 files
    0.62
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    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
    Diff Size diff_size
    0.332
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.062
    Real PR Conversation Timeline
    1 comments
    "Review active on #879"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 62.3% (MEDIUM) · Higher = larger blast radius
    62.3%
    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: 60.5% · Lower = rushed or shallow review
    60.5%
    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: 24.6% · Safe to merge
    24.6%
    Repository