oficina / equipo Public
NOT READY
Read-only review of HEAD 3bc1909. No files changed, tests run, network access, or other reviewers.
- Critical: the command allowlist does not enforce mutation authority.
deploycan enable instances and create a route, beyond create/upload/promote (platform/deploy.go:1081). Upload and promotion happen inside one invocation, without another Equipo authorization (platform/deploy.go:502). Withdrawal during upload can therefore precede publication. Replace the composite command with explicit, individually authorized operations. Define authorization immediately before publication as the commitment point; cancellation afterward cannot guarantee “nothing is published.”
The dedicated-account publish credential is acceptable as a temporary, explicitly broad credential after these executor fixes. It grants permanent creation and keep, too; the server does not enforce the proposed temporary-only restriction (platform/authcli.go:593).
- Critical: repository redirects can reach the runner’s network. Static
_redirectssupports external destinations and forced redirects over existing files (platform/redirects.go:19). Deploy’s watch uses an HTTP client with default redirect following (platform/deploy.go:1728). A repository can redirect its probe to a runner-local service. Cut deploy’s watch; use a bounded, credential-free marker fetch that refuses redirects, requires HTTP 200, and checks task, full candidate, attempt and digest.
- Important: authorization before building is underspecified. The proposed digest condition cannot hold before the build, while ordinary start authorization checks assignment/withdrawal but not preview approval (runners.go:584). Specify a start check for the exact approved candidate, followed by publication authorization against its persisted, acknowledged build digest. Re-read config from that candidate; Engineering’s
has_previewis scheduling evidence, not authority.
- Important: export needs an explicit safe sequence.
os.OpenRoot(outputPath)follows symlinks in the root path itself; root methods also follow internal symlinks (Go root.go:41, root.go:79). Open the trusted workspace root first, reject symlinks in every output-path component, and export only after proven namespace termination.runGateexposes that proof separately from exit code (judge.go:485). Enforce byte limits while copying, create fresh files in a private staging directory outside every mounted tree, and keep CLI working-directory/config discovery outside repository content. Reserve the marker filename and exclude it explicitly from its own digest.
- Important: failure does not establish nonpublication. Promotion precedes CLI verification (platform/deploy.go:508); recovery currently turns ordinary interrupted steps into
runner_restarted(step.go:380). Persist mutation intent and immutable artifact identity before sending. After timeout, cancellation or restart, reconcile through reads; do not rebuild or blindly republish. Keep an explicit unconfirmed outcome, including for withdrawn attempts. An empty outbox alone is insufficient for rollback: stop dispatch, settle active previews and host processes, then drain reports before replacing the binary.
- Important: lifecycle handling must precede replacement. TTL renewal is needed for sliding expiry and safely refuses permanent/trashed apps (platform/apitemporary.go:262). But renewing after publication can fail after content changed. Check lifecycle first, renew before publication, and use the platform’s returned expiry; initial creation has no separate TTL call. Refuse kept apps despite their
tmp-name. Distinguish missing, live, Trash and unknown states; never infer absence from an error. The 20 cap applies to creation, not replacement (apitemporary.go:165).
- Important: version names and scheduling need uniqueness. Attempts belong to steps, so
<cand7>-<attempt>is not globally unique within a task. Carloku refuses changed bytes under an existing version (platform/release.go:807). Use the preview step ID plus attempt, retaining the full candidate in the record. Schedule once per candidate. Keep previews ancillary: advancement currently depends on the last step completing, so a failed preview could block merge progression (review.go:182).
- Important: protocol 8 needs refusal semantics, not just field stripping.
LeaseCheckhas no digest field (frames.go:361); define its binding to the acknowledged build record. Refuse preview execution on either peer below 8, including an already-running attempt. Never downgrade preview authority into an ordinary lease. Fence queued and running steps and retire pending dispatch commands before replay, following mergeauth.go:458. Test reconnect, held dispatch and rollback, alongside strict field downgrade.
- Minor: correct the budget claim. It is 50 create attempts per principal, including refused requests, not 50 successful creates per account (platform/authcli.go:124). The limiter is in memory, so it is not a durable daily spending guarantee (authcli.go:216). Describe that limit accurately and handle refusal without automatic retries.
Copy verdicts for section 7:
| Key | Verdict | |---|---| | work.specialist.preview | ACCEPT | | work.tl.preview_built | “Prepared %d files (%s).” | | work.tl.preview_deployed | “Preview ready” | | work.card.preview | ACCEPT, using confirmed expiry | | work.reason.preview_cap | “the account already has 20 previews” | | work.reason.preview_expired | ACCEPT, only after confirming Trash/name occupancy | | work.reason.preview_unconfirmed | “we could not confirm the preview” | | work.reason.preview_build | ACCEPT | | work.reason.preview_too_large | “the preview exceeds 2,000 files, 10 MiB per file or 50 MiB in total” | | work.reason.runner_outdated | “the runner needs an update for previews” |
Also replace section 2’s “Preview not deployed” with “Preview could not be confirmed” for uncertain publication outcomes.