Repository navigation
An owed proof runs its routes, and the sandbox reaches the team's own app hosts - #927
Conversation
… app hosts A test fix's own review asked for a repeat run the sandbox couldn't make: the team's staging site and preview were refused by the sandbox's network, because its allowlist held only hosts typed into Settings. The round asked a person to widen the allowlist or run the command, called a CI repeat outside the ticket, and nothing picked the pull request up again. - Where the team's apps are served is read from the default branch only (end-to-end config, env templates, workflow environments, deploys), kept per repository with its source, and allowed under a verified domain; an unverified domain is suggested once in Settings. - A repeat proof is a plan with routes tried in order: the sandbox against the preview, staging, the app started from the repository's own script, then CI (repeat input, one start per run needed, or re-runs). - The fix round's rules, the test fix's ready check and the flaky-test note never hand a repeat run or the allowlist to a person. - The pull request watch picks up pull requests whose own review asks for a proof the sandbox couldn't reach, runs the routes and hands the result to the review of the head. - Incident case xc_owed_proof_runs_its_routes.
| .and_then(|v| v.as_l().ok()) | ||
| .map(|l| l.iter().filter_map(|v| v.as_s().ok().cloned()).collect()) | ||
| .unwrap_or_default(); | ||
| let suggested = suggested_web_domains(&state, &claims.team_id, &web_domains).await; |
There was a problem hiding this comment.
💬 FYI: A parallel structure next to an existing one (scope, not verified)
services/gateway/src/routes/reviewer.rs adds suggested_web_domains next to the existing web_domains_from. Extend the existing one (add the entries or the parameter there) and remove the new one. If the ticket truly needs it, say why on a line Wider than the ticket: services/gateway/src/routes/reviewer.rs: <why>.
FYI, not a block: on the whole picture this is not a named correctness, security or data-loss problem to hold the merge on.
Superseded by CoderHelm's latest review
|
💚 Post-merge health check passed: the deploy of
|
Summary
A test fix's own review asked for one thing: the test passing a set number of times in a row with retries off. The sandbox couldn't reach the team's staging site or the pull request's preview, because its network allowlist held only hosts typed into Settings. The fix round then stopped, asked a person to widen CoderHelm's allowlist or run the command, and called a repeat on CI "a CI change outside this ticket". The findings had already had their round on that head, so nothing picked the pull request up again.
This pull request fixes the shape, not the one host:
baseURL,*_BASE_URL), env templates (never a real.env), workflow environments (url:, templates likepr-${{ github.event.number }}.preview…read as their domain) and the default branch's deploys. A pull request's head is never read for hosts, so a change can't add a host for the sandbox to send data to. A derived host is allowed only when it falls under a domain the team verified in Settings (its web domains, the storecheck_urlalready uses). A domain the default branch names that isn't verified yet comes back assuggested_web_domainson the reviewer settings, for an admin to confirm once; from then on every host under it is automatic. Shared hosting suffixes (vercel.app,cloudfront.net, a bareco.uk) are never suggested. Every derived host is kept with its source and the verified domain it falls under.This is the first of two pull requests; the second covers typed hand-offs, a feasibility check before a blocking finding on CoderHelm's own pull request, a stall detector, and hand-off counts.
Link with #928 (the evidence-led test fix). #928 measures a test's failure rate and turns it into the number of runs a proof needs (
e2e::fix_evidence::repeats_for). This pull request chooses the plan's count in one place,proof_routes::repeat_count(asked, measured), wheremeasuredis that number; until #928 merges it is passed asNoneand the review's own count is used. Each route's result goes back as counts throughPlan::tally(): runs that passed or failed on the page, and routes that never reached it, which are never failures (the same rule as #928'sRunResult::NotReached). Whichever of the two merges second rebases onto the other and wiresrepeats_forintorepeat_countandtally()into the evidence'sMeasure.Changes
common::agent_policy::repo_hosts(new): reads app addresses from default-branch files and deploys, sorts them against verified domains into allowed (with source) and suggested.agent::policy::learn_repo_hosts(new) keeps them per repository on the team's settings, read again only when the default branch moves;sandbox_egressincludes the allowed ones. Called before a run's sandbox is built and before each sandbox proof route.GETreturnssuggested_web_domainswith each domain's source.common::e2e::proof_routes(new): the plan, its routes, the sandbox outcome reader, the local app from a package's own scripts, how a workflow repeats a test on CI, and the CI step.passes::proof_routes(new): runs one route (or one CI step) per call and keeps the plan on the run.proof_routes::repeat_countandPlan::tally(the seam with A failing test is fixed from its evidence, or not changed at all #928).pr_watch:proof_dueandAct::ProveOwed, with the ledger's owed proofs and the plan on the candidate.own_review_ledger:owed_proofs,proof_given, and the round rules and unblock instruction updated.test_fix::ready_gateand the flaky-test fix note go through the routes instead of a person's instruction.xc_owed_proof_runs_its_routeswith its page.Verification
cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rscargo clippy -p common -p worker -p gateway --all-targets -- -D warningscargo test -p common -p worker -p gatewaybrand_spelling.py,domain_examples.py