fix(output): retain admitted scope through uploads and publication
聽
TH
10m ago+748+748+012345678901234567890123456789-375-375-012345678901234567890123456789
Summary
A daemon-produced artifact belongs to the tenant and lease of the request that produced it. A tenant-owned artifact, upload or materialized path serves only its own tenant. Remote callers choose the tenant and lease they send, so those values no longer decide who owns another request's output. Staged uploads are capped per tenant.
Before / after
- Download of another request's output: 0.22 assigned the owner at finalize from the requesting tenant. Now
trackDownloadableArtifactrequires the producer'sArtifactOwner; a mismatch returnsTENANT_OUTPUT_MISMATCH. - Untenanted entry: 0.22 served any tenant. Now exact tenant match only.
- 33rd unconsumed upload for a tenant: 0.22 accepted it. Now
UPLOAD_LIMIT_REACHED.trace stop,perf stopandperf reportcheck tenant and lease.
Validation
Head daf62a2e3e. Production vs origin/0.22: +272/-193.
- Unit-core on changed files plus 134 related daemon/proxy files: pass. Wire-compat: 52 passed.
- Revert proof: with production restored from 0.22, 14 tests fail, including every new test.
- Hosted CI owns lint, typecheck, Coverage and integration.
artifact-tracking.tsis at the 1000-line cap. - Uploads carry the request tenant, so a tenanted CLI install works on a hookless daemon. Live tenanted proxy runs (install; trace and perf capture) in the PR comments.
- Definitive typed upload refusals (authorization, lease or tenant scope, upload limit) reach the CLI with reason and hint, with no legacy fallback. Other failures, such as an expired ticket, keep the legacy upload.
- Risk: uploads bind to tenant, not lease.