Repository navigation
fix(usage): persist host fingerprints across container recreates - #15626
maria-rcks wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe server now resolves a stable host ID for usage fingerprints. It uses ChangesUsage Host Identity
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to Usage reporting continues when identity persistence is unavailable. No actionable issue remains from this review; the change is mergeable after normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change is limited to usage attribution and deduplication; no new authorization capability was demonstrated. Atomic publication and explicit fallback constrain failures, but actual container recreation and interruption recovery remain unverified. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a contained usage bug fix that stabilizes source identity across container recreates, with explicit override and failure fallback behavior covered by tests. It adds only a small advisory identity file and documentation, without schema, deployment, security, or billing changes. You can add or adjust custom eligibility rules. Learn more. |
|
Note Written by The default identity change follows the maintainer's accepted triage and suggested fix: "Persist the first-seen hostname ... on the T3 volume and reuse it after recreate" and/or honor The persisted value starts as the existing hostname, so initial non-container and sibling-worktree fingerprints retain the same host/path/volume key. The changed behavior stabilizes that key when the disposable hostname changes. Existing-file regressions verify unchanged shared-history totals, distinct hosts, restart/override removal, concurrent initialization, and unavailable persistence; all 70 scoped Blacksmith tests and exact-head CI passed at Actual Docker recreation and the live provider/client path remain unverified and are disclosed in the body. This evidence does not establish merge readiness; that runtime pass and two independent final reviews remain pending with the parent task. |
Container recreates change
os.hostname(), making the same provider history look like a different usage source. Save the first hostname in<T3 home>/usage-host-id, publish it atomically for concurrent startup, and reuse it across restarts.T3CODE_HOST_IDprovides a trimmed explicit override without rewriting the saved identity; unavailable persistence falls back to the current hostname.The maintainer's triage and suggested fix explicitly recommends persisting the first-seen hostname and/or honoring
T3CODE_HOST_ID, with the current hostname as fallback. This PR follows that scoped direction.Keeping the original hostname preserves deduplication between sibling worktree servers instead of substituting their distinct environment IDs. This adapts the persistence approach from #13984 and the override from #12299. Environment display labels remain a separate issue from source fingerprints.
Verification:
UsageService,usageScanCache, andusageMerge. Existing-file regressions exercise hostname changes, override precedence/removal/blank values, shared-worktree totals, distinct hosts, concurrent initialization, and unavailable persistence through real filesystem/transcript scans.layerTestwarning.Closes #11849.
Model:
gpt-6.1-sol(xhigh). Harness: Codex in T3 Code.