bez docs feature-loop.md
98 kB · 1,274 lines
Markdown
at main

The feature loop: pick, define, route #

Status: pick, define and route are built (see "Build order" for what is and is not). Goal: a feature job runs from "which feature next" to a landed generated function with no model call for coordination and none for writing the job definition (AGENTS.md → "Decisions that never wait on a person"). The landing end exists (jobs/scripts/submit.sh, jobs/scripts/poll-and-land.sh); this plan adds the front.

Four architectural choices are settled below ("Settled decisions"); every step is built without asking. A new architectural choice found while building stops the work for an answer.

What exists and is reused #

Piece Anchor Used for
Triage crates/generation/src/bin/feature_triage.rs main; record corpus/<feature>-triage.json (summary, unattributed, keys, pages, engine_commit) per-feature pass, fail, which function is implicated, which failures are unattributed
Feature files oracle/suites/features/*.json (source, pages, deny, specification), read by oracle/suites/feature-pages.mjs which WPT pages a feature admits
Map docs/web-features-map.json, docs/web-features-map.md → "Inputs" (pages reach features through WEB_FEATURES.yml) the universe of features and per-key status
Triage credit jobs/src/feature_rules.rs triage_verifies, evidence_resolves; oracle/suites/feature-map-rules.mjs triageVerifies verification-only credit
Landing jobs/scripts/submit.sh, jobs/scripts/poll-and-land.sh, bench/land.sh send and land a job
Definitions specs/aspect-ratio.md + .job.json (WPT-sourced, the template); specs/display-contents.* (generated pages, hand-written case module); specs/viewport-units.* (small, no generated function) template sources
Score docs/wpt-checklayout.md (docs/wpt-checklayout-results.json) per-directory pass share, as a tie-break

Reading specs/aspect-ratio.job.json: apart from the name, every stage is the same for any function that has the four function-specific files below; the per-function values are the feature_rules patterns and evidence, the --resolver path, --module, --rule, --baseline, the *_types.rs/*_engine.rs/*_call_site.txt paths, the models line, and limits. That is why the definition can be filled from a template.

Piece 1: pick #

  • Inputs: docs/web-features-map.json features with status none or partial; the feature's WPT pages (via WEB_FEATURES.yml); corpus/*-triage.json; docs/wpt-checklayout-results.json.
  • Output: docs/feature-queue.json, a ranked list: feature, failing pages, attributed pages, unattributed pages, implicated functions, ready (every implicated function is job-able, below), reason.
  • Rule. For feature f with triage record t: score(f) = attributed_failing_pages(f) = fail(t) - unattributed(t), counting only pages whose implicated functions are all job-able; ties go to the lower unattributed / fail, then to the feature name (the checkLayout share of the page's directory is not used yet: a record names pages, not directories). Before that score comes the number of engines shipping the feature (engines, 0 to 3, "Engine count and the feature states" below): features all three of Chrome, Firefox and Safari ship rank first, then those two ship, then one. A feature with unattributed / fail > 0.5 is not ranked; it goes to the hand-written list (piece 3). This is the AGENTS.md rule "failing pages most numerous and not blocked on missing hand-written layout" made a formula. The 0.5 threshold is from the measured records: box-sizing 3 of 5 and fit-content 10 of 10 unattributed.
  • Triage must exist before ranking. For a feature without a record the script builds one: feature file -> feature-pages.mjs -> pages_ground_truth_cache -> feature_triage (the reproduction steps in docs/feature-to-function-design.md → "The first piece"). The feature file is derived (settled decision 1) unless one is hand-written.
  • A landed feature gets its next job on another function. A feature's job is open until its current definition has a landing tag; after that the feature is eligible again once its triage record is measured at or after the landing (the scheduled step measures such a record again on a build lane before any untriaged feature, jobs/scripts/scheduled-triage.sh; by hand, feature-loop-step.sh --retriage <n> re-measures the records that predate it), and the new job takes the best function other than the landed one and replaces specs/<feature>.md and .job.json. The failing pages of a feature span several generated functions, and rerunning the landed function would replay its cached stages.
  • Where it runs: bench/on-lane.sh on a build lane (browser runs and layouts of hundreds of pages), by cron on the development box that calls it, or by hand. No Dagu; it is not a job, it writes a file. build for the ranking script given existing records; feature-file derivation is a second build step.
  • Fails safe: a feature whose triage cannot run (no usable pages, tree not clean, unmeasured pages) is listed as skipped with the reason and never ranked. A stale record (engine_commit not an ancestor-or-equal of main since a layout change) is rerun, not trusted. Output is rewritten whole; a crash leaves the previous file.

Piece 2: write the job definition #

  • Inputs: the queue's top ready entry; its feature file; the function's *_types.rs, *_engine.rs, *_call_site.txt, runner (crates/generation/src/*_runner.rs).
  • Output: specs/<feature>.md and specs/<feature>.job.json, the manifest being the short form and the prose filled from the feature file and triage summary, written by a job-check subcommand (new-feature-job). The manifest must pass job-check manifest --spec (jobs/src/manifest.rs validate) and crates/harness/tests/spec_lint.rs; the script runs both and writes nothing if either fails.
  • Types stages: when crates/layout/src/generated/<module>.inputs.json exists, the types file is the types_from_list tool's output and stays as it is, so the expansion leaves out types-prompt, types-candidates, types-keep and types-use, their corpus/<feature>-types-* folders, and the types file from the prose's touches line (jobs/src/feature_job.rs generate_with; job-check new-feature-job looks for the list under its workdir). A model-written types file would replace it and fail to build against the list's String and Vec fields. The coverage-pages and findings-pages stages stay. specs/padding.* and specs/fit-content.* (function height) have this shape.
  • Inputs-list stages: a single function with no list gets, where the types stages stood, the four stages that design one (jobs/src/feature_job.rs design_stages): inputs-prompt (jobs/scripts/inputs-prompt.sh: the prompt's sections are the function's own, from oracle/suites/input-designer-sections.json, not the feature's), inputs-request (three replies from the candidate model), inputs-keep (the replies the validator passes) and inputs-use (jobs/scripts/inputs-use.sh: the first kept list the call site reads, that builds, and whose inputs check over the job's ground truth has no conflict, written in place with the types, engine values, sources and starting candidate types_from_list makes of it). store and admit carry the list (--inputs-list), so a landing commits the list beside the function. Designing a list is feature work, so it runs inside the job on folknet rather than as a structure task: the validator, types_from_list and the inputs check judge a list, not a person. A group job keeps its types stages. A list that needs a source the format cannot name or the engine cannot read fails inputs-keep or inputs-use with inputs-list gap: lines, which become a structure task ("Build order" 7).
  • Refresh: each pass of feature-loop-step.sh --apply runs job-check refresh-feature-job on every definition. One whose function has a list now but whose stages still write types or design a list is written again without them (jobs/src/feature_job.rs refresh), because a model's types file or a second list would replace the landed list's files. Its short form is read back from the manifest (short_form_of), and the definition is rewritten only when that short form expands to exactly the files on disk, so a definition edited by hand or written by an earlier template is left alone. A definition whose function has no list keeps its types stages: rewriting it would change a definition that still runs as written and send it again. The one exception is a designing definition whose inputs-prompt still calls input_designer on the feature's folder (the template before inputs-prompt.sh): it fails at that stage whenever the function's sections are not the feature's, so it is written again with the current command and a paragraph in the prose saying so (is_earlier_prompt_template). The prose changes the blob, so the schedule sends the job afresh ("its definition changed since the run"), and failure-tasks.py writes no task for a failed run whose recorded spec_sha is no longer the definition's blob.
  • Findings rounds: a review fail names the inputs the candidate answers wrongly; the findings stages turn them into pages and browser-measured train cases. findings-pages-keep measures the model's pages in the three browsers first and records the calls with that geometry pinned (generation::findings_pages::keep_with), because the engine lays an unmeasured page out with the function's deliberately wrong starting candidate in its place and every definite height then measures 0. Run 034o7OF9RJ9aTruWFAL52x of padding showed the cost: the pages giving the review's child-height inputs were rejected for 0-tall children, rounds 2 and 3 named the same wrong inputs, and the run used its whole round budget on them and landed on the score bar alone. The keep stage therefore needs the browser oracle, which every lane running a feature job has for the ground-truth stage that follows it; --no-measure is only for a run without one. A page's step for a NaN value is left out of the prompt altogether: NaN is how the engine records auto, and height: NaNpx is not CSS.
  • Triage attribution: the engine calls containing_block before every in-flow box's width call only to give width an input. The call is recorded as input-only (crates/layout/src/generated_calls.rs InputOnly), and feature_triage.rs box_calls leaves such calls out, so a failing in-flow box implicates width and not containing_block, whose answer the failing measurement does not come from. A call the engine reads its answer from (the one for an out-of-flow box) still counts. A record keeps the functions a page implicates but not the kind of each call, so an earlier record cannot be corrected from what it stores. The tool writes attribution (feature_triage.rs ATTRIBUTION, 2 now; a record without it is 1), and the queue (feature-queue.mjs INPUT_ONLY_SINCE, staleImplications) treats a record of an earlier version that implicates such a function as stale: it routes as skipped, so no job is written or ranked from it, and it is listed in needs_triage so the scheduled triage measures it again. A record that never implicated the function is unaffected. A job definition on that function whose record is stale is removed (the loop writes a new one on the function the fresh record picks); a definition on another function stays, because the change only drops containing_block from the lists.
  • Candidate mode: the short form may carry candidate_mode, "single-request" (the default, and byte-identical to a short form without the field) or "agent", with agent_count (sessions per round, default 4) and agent_session_seconds (default 3600), both only in agent mode. In agent mode the stage names, order, outputs and on_fail stay as they are; only the commands of candidates and repair change, to jobs/scripts/agent-candidates.sh. Each session (jobs/scripts/pi-session.sh) works in its own folder outside the repository, holding TASK.md (the prompt), the specification, types, engine values, call site and current function as files, a copy of the train cases, and a score.sh (jobs/scripts/agent-score.sh) that compiles its one candidate and scores it over those train cases only. The folder also has bin/ with the lookup tools (jobs/agent-tools/: spec, bcd, feature, cases, engine), first on the session's PATH and named in TASK.md, so the session reads the share's webref, browser-compat-data, web-features build and its train cases instead of the job's repository. It leaves its candidate in candidate/<name>.rs; the script gathers these into sources/, replies/ and requests.json, the layout bench/repair-loop.sh and store-candidate.sh read. repair runs the loop with --rounds 0, so the landing bar, held-out scoring and survivors are the pipeline's own. In a rework round each survivor gets a session first. Held-out cases are never copied into a session folder, and the session's shell runs with corpus/ and the lane archive masked (bwrap --tmpfs, else unshare --user --map-current-user --mount); the script exits 2 when neither works, rather than run sessions unmasked (--isolation none is for tests). The stand-in agent (jobs/scripts/stand-in-pi) runs it in jobs/tests/agent_candidates.rs. Single-request stays the default. Agent mode on padding with qwen3.8-27b-fast-2 (run 034kvI0G0FYliA8DRGqEvI, 16 sessions, 8 at a time, 3600 s each) was stopped in its first wave: all 8 sessions ran out their hour, 5 of them with no candidate written, each spending its turns reading the job's repository (crates/generation/, crates/layout/) rather than its own folder. The candidates stage alone needs two such waves, past the 1.5 times allowed against the single-request run 034ksqJPFXPA2SNAfIQBII (candidates 152 s plus repair 3377 s), so no score could have made agent mode the default.
  • Where it runs: the development box; it only writes two files and commits them to a track (track/<feature>) that bench/land.sh lands. build, once the template is extracted from aspect-ratio.
  • Fails safe: refuses (writes nothing, exit 1) when the function is not job-able, a specs/<feature>.* file exists, the checks fail, or submit.sh would refuse (a tag spec/<name>/<sha> exists). Submitting stays jobs/scripts/submit.sh, whose refusals are the rest of the guard. Spec text that a person would write (why the feature, scope) is produced from the feature file's specification and the triage summary, as plain templated sentences; see "Where a model is still called".
  • The manifest gains a short form (settled decision 2), so the 540-line stage list is not copied per feature.

Prompts fit the model's window #

No model request is sent for being larger than the model's context window. What is left out is whole failing or measured cases, never part of a case, and each stage says so in its log.

  • prompt (model_prompt, and types_prompt for the types prompt): the window is the smallest among the job's models (model::configured_window: what the gateway reports for each, else WEBENGINE_MODEL_WINDOW, else 131072 tokens). A request may hold model::prompt_byte_budget(window) bytes: the window less 32768 tokens for the reply (a third of a window too small for that) and a 2048-token margin, at 3 bytes per token. The prompt stage's prompt takes three quarters of that (model::first_prompt_byte_budget), because every repair request carries it plus a source and failing cases; the types prompt, which no repair carries, takes all of it. Over its share, cases are left out, spread evenly over the list; the specification, engine description, types and task are always whole. When even one case does not fit, the stage fails naming the sizes.
  • candidates (request_candidates): sends the stored prompt whole. A prompt over a model's window is reported before the first request, naming the sizes (prompt_fit::check_whole_prompt); rebuild it with prompt.
  • repair (repair_candidates): a failing-case request is the prompt, the candidate's source and the failing cases. It is fitted per candidate to the window of the model the candidate is sent to (prompt_fit::fit_repair_message): failing cases are kept one of each kind of failure in turn (a panic, a wrong answer, a box off), earliest first, until no more fit, and the message ends its list with how many are not shown. The candidate's source, the prompt and the closing instruction are never left out. The request's record in requests.json says in shown how many were left out. A candidate whose request cannot fit even with one case is not repaired that round, with the sizes in the log.
  • The opening is reused, so it never varies. Every request of a job opens with the prompt stage's file byte for byte: that file is sent unchanged, and nothing per request (a date, an id, a case count) goes before its end (crates/generation/tests/model_prompt_command.rs repair_requests_for_one_job_open_with_the_stored_prompt). Every rig server a job draws from keeps the computed state of a repeated opening — PREFIX_CACHE=1 on the Qwen workers, prefix caching in the DeepSeek pair's recipe (docs/rig-capacity.md → "Prompt reuse") — so after the first request on a worker, prefill costs only the part after the stored prompt: measured at 56k tokens, 91.3-92.7 s to first token cold and 5.5-5.6 s reused, and at today's 6.6k-token prompts 5.6-5.9 s against 1.5-1.7 s (docs/model-first-cost.md → "Prefill reuse across a job's requests"). Two limits a job cannot fix from the client: an alias spread over several workers keeps the opening once per worker, so each worker pays it on its first request after the prompt changed; and a request that reaches a worker while the same opening is still being prefilled there pays for it again rather than reusing it.

Piece 3: route the triage result #

Input: corpus/<feature>-triage.json. Output: one of three, written to docs/feature-queue.json.

  1. Every page passes (summary.failed == 0, unmeasured == 0): verification-only. The script points the feature's rules in docs/feature-map.json at corpus/<feature>-triage.json#<key> (triage_verifies decides; no model, no job). Needs a rule change per key and the schemaVersion bump noted in docs/web-features-map.md. The credit lands unattended (settled decision 3).
  2. Failures attributed to a generated function (summary.by_function): a function job, piece 2, one per implicated function (a failing page names several, so the order is the function with the most pages first, and the rest are re-triaged after it lands because the first admit can fix the others). Job-able functions only; a feature whose failing pages all implicate functions that cannot take a job yet is blocked in the queue, and readiness ranks those functions by the pages waiting for each.
  3. Unattributed failures (unattributed): a record in the hand-written list. The list is docs/hand-written-layout.md, generated by the same script, one block per feature: failing pages grouped by the record's reason: a value the engine cannot represent reached named functions, or no function decides what fails. A person sees it by opening the file; the queue also counts it. The hand-written file that decides a group is not derived; the group names the functions that were handed the lost value.

Fails safe: a page with outcome unmeasured is neither pass nor fail and blocks route 1.

Which functions can take a job #

A function can take a job when it has an *_engine.rs, *_types.rs, *_call_site.txt and a runner, and its inputs can determine the answer the browsers measured (next subsection). oracle/suites/feature-queue.mjs jobAble reads both; a function with no inputs-check record is not job-able. The paragraph that follows lists the functions that have the four files (docs/feature-to-function-design.md → "Review (2026-10-19)"): absolute, aspect_ratio, box_generation, containing_block, height, margin_classify, margin_combine, width. The others in crates/layout/src/generated/ (float, inline_atomic, overflow, percentage, relpos, stacking, table, transform) are not; relpos took about 570 lines on the physical-properties-job branch and height about 600 (below). Order to make ready: the readiness list of docs/feature-queue.json, which counts the failing pages waiting for each function. On the records at the intrinsic-size commit and the first derived feature (padding) it is height and margin_classify (21 pages each), width (19), margin_combine (17), absolute and containing_block (9 each), percentage (2); the earlier guess of absolute first is replaced by this list. height and margin_classify are decided together, so they are likely one track. The cost per function is one engine-values file, one types file, one call-site file and one runner: build, one track per function, each landing independently. There is no per-function lock (settled decision 4): the queue holds at most one open job per function, and its ready filter keeps every other function off the pipeline. With height, margin_classify, margin_combine and width job-able the list started absolute and containing_block (9 each), and padding was the queue's next, on width (18 pages). With those two job-able as well the list holds percentage (2) alone, and fit-content (on absolute, 5 pages) and box-sizing (on containing_block, 2 pages) are in next.

The inputs check #

A function's inputs are drawn from the specification sections that define its answer (for height, CSS 2.1 10.6.3, 10.6.7 and 9.4.1: the children's boxes and margins, floats and computed style, all of which a browser exposes). A function whose inputs include another function's answer, or a value no browser measures (the static position, a content height the engine fills from deliberately wrong neighbours), cannot be recovered by any candidate: the same inputs occur with different browser answers. Jobs on height and absolute ran for hours and closed no-gain for this reason. The stage that makes a function job-able therefore reads those sections to choose the inputs, and then runs the check:

cargo run -p generation --bin inputs_check -- --function <fn> --cases <ground-truth dir>... (crates/generation/src/inputs_check.rs) takes the calls the function's page runner shows a model (function_calls: every call the engine makes for a box that the prompt lists, the call before a box's children included, each with the inputs the engine passed and the answer the browsers measured), groups them by inputs on the 1/64px grid, and writes crates/layout/src/generated/<fn>.inputs-check.json:

  • conflicts: the input groups with more than one browser answer (count, calls, and up to five examples with the node, the inputs and the differing answers). Any conflict means the inputs do not determine the answer; the examples are the evidence a redefinition of the function's inputs starts from. Only a call whose answer a browser measures by itself counts: a call with no expected output (the call before a box's children) is listed in calls and left out of answered_calls. A box the engine asks about more than once shows as separate calls with their own inputs, so calls whose inputs differ fall in separate groups.
  • Pinned boxes. height, width and aspect_ratio record their calls with every box's width, height and offset held to the browsers' measurement (layout::pins, Free::NOTHING), the children's pins in place before the parent's call, so a measured input (a parent's width, a child's height) is the browsers' and not a neighbouring function's deliberately wrong answer. Their candidates are scored the same way, call by call (page_scoring::wrong_call_answers): each call's answer is compared with the browsers' value for that box (height: the content height; width: the border-box width less padding and border, and the computed margin-left and margin-right; aspect_ratio: the content width and height). A call with no browser counterpart is skipped, and shows in calls but not in answered_calls. For width: a box whose margins a browser does not report in px or the browsers disagree on, or whose width the vote splits on. Never recorded at all: a float, a box with an aspect-ratio (its width is the ratio's), a table whose columns decide its width, and the second width call a ratio box makes. For aspect_ratio: a box whose width or height the vote splits on, and the call before a box's children. For width the records over corpus/ground-truth have 1195 calls, all answered.
  • answered_calls, checkable: calls with a browser answer, and whether there are any. A function with none (containing_block, margin_classify, margin_combine: a browser measures where boxes end up, not the function's answer; absolute, whose runner's answer is the landed function's own) has nothing to compare and is recorded as not checkable.

jobAble requires the four files and no conflicts. A record with calls but no browser answer (absolute, containing_block) does not block: such a function is job-able on the four files, as it was before the check. A record with 0 calls (margin_classify, margin_combine, table_auto_columns, table_grid_rows) is not job-able: the engine never calls the function on those cases, so no candidate can change a score. The check holds no web rule: it compares recorded inputs with recorded browser answers. There is no lookup-table score: a table keyed on the inputs of one recording and replayed in a layout that changes those inputs is not an upper bound, and replaying under the recording's exact conditions would repeat the conflict count.

A function that fails is redefined without a person: before its commit, the scheduled step (feature-loop-schedule.sh) runs jobs/scripts/inputs-redraw-tasks.py, which writes jobs/generated-tasks/<fn>-inputs.md for every record with conflicts that has no such file. The spec-watch tick runs it on a remote lane. The task names the function and the specification sections the job definitions crediting it give, lists the record's conflict examples, and tells the writer to hold a measured input to the browser's value in scoring, or to replace another function's answer with the values the sections build it from. It forbids any part of the rule, and it is done when inputs_check reports 0 conflicts. A function that needs a value neither computed style nor measured is left to be split, which waits on a person. A task file that exists is never rewritten, so deleting it asks again. This and the stall task ("Build order" 7) are structure tasks generated rather than written by /spec (AGENTS.md "Two job systems").

The check reports the inputs as the runner records them, so it answers whether the model is shown inputs that determine the answer. Where a runner leaves a neighbour's answer to a deliberately wrong function, the conflict is that function's: width frees every box's width (layout::pins::Free::WIDTH), so each box's containing_block_width is the stand-in's answer for its parent, 0 from the root down, whatever the browsers measured for the parent; aspect_ratio shows content_height_from_children as laid out by the landed height function, 0 for a box whose child has a height: 100px. These are the same defect as height's.

The redraw is meant to be done by the input designer (docs/input-designer.md): a step that writes the function's inputs as data, each from a computed style property or a browser-measured value, checked against a list of known sources. Its list is to feed the types-file step (the types file and the starting candidate are written from it, in a later slice) and then replace the part of types_prompt where a model picks inputs from the engine's fixed list of values; until then the two run side by side and height.inputs.json is not read by anything else.

The record is measured over the cases it was run on; rerun it when the function's types file or the cases change. The check ran over the caches present on the development box: padding pages for height, the generated corpus for width, box_generation, margin_classify and margin_combine (which have no calls there), the aspect-ratio pages, containing-block and absolute corpora. table_auto_columns and table_grid_rows have no record because no cache with their calls was available, so they are not job-able until one is run.

What making a function job-able took (height) #

The recipe, in the order the files depend on each other; relpos (git show 34c286ee) and aspect_ratio are the other worked examples.

  1. <fn>_engine.rs: <Prefix>EngineValues, every value the engine has at the call under one name and type, with a Needed: paragraph on the values the specification's rules read (jobs/src/types_file.rs check_needs) and a <Prefix>EngineAnswer with the fields the engine reads from the answer. For height these are the six fields every call site has (layout_box, the table cell loop, layout_absolute_box) plus min_height and max_height for CSS 2.1 10.7 clamping. Only layout_box reads a style, so only it fills the two limits (a percentage resolved against the containing block's height, None when there is no definite one, which 10.7 reads as 0 and none); the other two sites pass None. The limits clamp a definite and an auto height alike, and layout_box clamps the height it hands its children as their percentage basis. A positive min-height stops an auto box collapsing its margins through (8.3.1).
  2. <fn>_types.rs: the types file the committed function is written against, <Prefix>Inputs, <Prefix>Outputs, <Prefix>Resolver, as the first model-written file would be. job-check types <file> --engine <engine file> must pass.
  3. <fn>_call_site.txt: where the engine calls the function and what it does with the answer, one paragraph per call site.
  4. <fn>.rs: re-exports the types, include!s the <fn>_inputs_from.rs that crates/layout/build.rs writes (add the function to its FUNCTIONS), call(), and a baseline that reads the engine's values through a thread-local the way aspect_ratio::resolve_baseline does, because a model's types file may not hold what the baseline needs. The committed generated/<fn>.rs stays as it is when it is written against the types file in place.
  5. fragment.rs: each call site builds the engine values and calls <fn>::call; the site whose answer is the box's own records a <Prefix>Call through call_recording::record. Layout does not change (generated_score_check and bench/checklayout-diff.sh).
  6. generation/src/<fn>_page_runner.rs: scores a candidate over measured pages with every other function as landed, and records each call with the browsers' value for the box (height: the border box they measured less edge_tb). The function's own corpus scorer (height_runner) stays for generated_score_check. In candidate_crate.rs Seam::<Fn> gets a function_name, the page runner as its runner and its function_calls as recorder; model_prompt.rs calls_heading gets the text that introduces the cases.
  7. The inputs check: run inputs_check for the function (previous subsection) and commit its record. A function whose record has conflicts goes back to step 1 with its inputs redrawn from the specification sections. A function with no per-call browser answer is recorded as not checkable and goes on to step 8.
  8. The queue: oracle/suites/feature-queue.mjs jobAble needs the four files (*_runner.rs is the corpus runner height already had) and the record from step 7. Rerun it and commit docs/feature-queue.json.

job-check new-feature-job for padding on height first refused, because feature-queue.mjs shortForm put the specification address in the manifest's --rule and a manifest holds no address; sectionName writes it as css-box-4 #paddings. The generated pair then passes job-check manifest --spec. No job was submitted.

Not checked by this change: a job's model rewriting height against a new types file (the stand-in baseline and the inputs_from copy are exercised only against the committed types file), and the cases a job would show (height_page_runner has been run on synthetic pages, not on measured padding pages).

What margin_classify added to the recipe #

margin_classify followed the steps above (margin_classify_engine.rs, _types.rs, _call_site.txt, margin_classify.rs, the build.rs entry, fragment.rs calling margin_classify::call at its three sites through classify_box, which also records a MarginClassifyCall, and generation/src/margin_classify_runner.rs as the page runner with Seam::MarginClassify named margin-classify). Four things differed.

  • The function shared a generated file and a score corpus with margin_combine. One module held classify and combine, a job writes generated/<module>.rs with one resolve, and Resolvers::generated() has to point at that file or an admitted function would never run. So classify moved to generated/margin_classify.rs (resolve, with its own copy of the provenance record and score floor, 156 of 227) and generated/margin.rs keeps combine. generated_score_check scores margin_classify and margin_combine (then still margin) on the same cache with the same runner, each with the other half as landed, so the two floors hold independently. margin_combine was made job-able the same way (next section) and generated/margin.rs renamed to generated/margin_combine.rs.
  • The old names went with the first loop's move. The generation loop's candidates, fixtures, prompt and runners import MarginClassifyInputs/MarginClassifyOutputs and classify_baseline (all false: nothing collapses) from margin_classify; the baseline reads no input, so it needs no engine values. fragment.rs imports them from margin_classify too; the module layout::margin is gone.
  • A browser measures no collapsing decision. height has the browsers' box height to compare with; here the browsers give only where boxes end up. margin_classify_runner records every box's call with margin_classify::resolve_reference (the 8.3.1 rule over the engine's values, through the same thread-local as height's stand-in) and gives a call an expected output only when the page laid out with that rule matches the browsers at every box. A page that does not match shows no expected output and is left out of a prompt, and still scores a candidate through the geometry.
  • The call has no single owning site. Three sites call it for every box with children, so a box is recorded up to once per layout; record_calls keeps the last.

Checked: job-check types on the types file against the engine file; new-feature-job for padding on margin-classify in a scratch directory, then job-check manifest --spec on the pair; cargo test --workspace.

Not checked by this change: a job's model rewriting margin_classify against a new types file (the stand-in and the inputs_from copy are exercised only against the committed types file); the cases a job would show on measured padding pages (the page runner has run on synthetic pages); job-check types --specification on the margin-collapsing text (the phrases in the engine file's Needed: paragraphs were read off the text, not run against it).

What margin_combine added to the recipe #

margin_combine followed the same steps (margin_combine_engine.rs, _types.rs, _call_site.txt, margin_combine.rs, the build.rs entry, fragment.rs calling margin_combine::call through combine_margins, which call_block_flow in fragment.rs hands to block_flow as a plain function (at the time, five sites in stack_children), generation/src/margin_combine_runner.rs as the page runner, Seam::MarginCombine named margin-combine). Four things differed.

  • The input is a list. One group of adjoining margins has any length, so the engine's struct and the types file's inputs struct borrow it: MarginCombineEngineValues<'a> and MarginCombineInputs<'a> hold margins: &'a [f64], both with the lifetime named 'a (type_text compares the type as written, so a types file with another lifetime name is refused by check_names). build.rs writes inputs_from<'a> when the inputs struct has a lifetime. Nothing is copied: the call costs one indirect call as before, plus the one check call_recording::record_with makes for a running recording.
  • The stand-ins read the inputs. height's and margin_classify's stand-ins read the engine's values through a thread-local because a types file may not hold what they need. Here the one value is the whole job, so resolve_reference and resolve_baseline read inputs.margins, and a types file without it does not build; job-check types --specification refuses one while the text says "adjoining margins".
  • The old pair stays scorable. generation::margin_runner scores a classify and a combine together over the recipe corpus (the first generation loop, generated_score_check). Both take the job functions' own types (fn(&MarginCombineInputs) -> MarginCombineOutputs for combine, the engine's MarginCombineResolver), so a candidate's combine goes into the engine's table of resolvers as it is. The slice-function adapter (MarginCombineFn, with_combine, resolve_installed, combine_baseline, combine_generated) is gone; the baseline is margin_combine::resolve_baseline and the committed function layout::generated_margin_combine_resolve. The loop's prompt shows the two types files (margin_classify_types.rs, margin_combine_types.rs) as the signatures. generated/margin.rs (with its provenance record and floor, generated_score_check's margin entry) became generated/margin_combine.rs. candidate_crate::Seam::MarginCollapse keys on layout::margin_collapse::MarginClassifyResolver (a label, no such module) as its resolver path so it stays distinct from Seam::MarginClassify's.
  • The caption of an expected output follows the function. prompt_parts::FunctionCall has expected_from: Browsers (the default every function had: "from the box the majority of the browsers measure") or HandRule (margin_classify and margin_combine: "from the engine's hand rule, on a page the browsers lay out the same way"), because no browser measures either answer by itself.

margin_combine_runner records every group a box asks about, in call order, one call per distinct group of a box; a group of zeros decides nothing and is left out, as generated_calls leaves it out. The expected output is the hand rule's answer when the page laid out with the hand rule matches the browsers at every box, as for margin_classify.

Checked: job-check types on the types file against the engine file; new-feature-job for padding on margin-combine in a scratch directory, then job-check manifest --spec on the pair; cargo test --workspace; generated_score_check --score margin_combine and --score margin_classify (156 of 227 each, the floors); bench/checklayout-diff.sh (no change in any of the 872 pages).

Not checked by this change: a job's model rewriting margin_combine against a new types file; the cases a job would show on measured padding pages (the page runner has run on synthetic pages); job-check types --specification on the margin-collapsing text; the layout time of rendering.html (the call is no longer than before by construction, not by measurement).

What width added to the recipe #

width followed the same steps (width_engine.rs, _types.rs, _call_site.txt, width.rs, the build.rs entry, fragment.rs calling width::call at its two sites in layout_box_styled, generation/src/width_runner.rs as the page runner, Seam::Width named width). Four things differed.

  • The engine's values are the inputs it already had. layout_box_styled resolved an intrinsic-size keyword on width, min-width and max-width to a length before the call, so WidthEngineValues holds the twelve fields WidthInputs always had, and the call-site file says a keyword never reaches the function. Direction stays in width.rs (the absolute and relative-positioning functions import it from there); the engine and types files import it from crate::width, and the call-site file shows it beside LengthPercentageOrAuto.
  • The old name stays, but it needs a call. width::resolve_block_width_baseline is still the baseline resolver the generation loop, Resolvers::baselines and the tests pass around, but it now reads the engine's values for the call in progress, as height's does, and panics when called any way but through width::call.
  • Seam::Width changed runner. The first generation loop's candidate_crate::write (generation_loop, real_model_run) writes Seam::Width, so its candidates now run under width_runner::main, which lays a page out with every other function as landed; the corpus scorer generation::runner still scores generated_score_check's width entry with the others at their baselines. The two runners read the same environment (page_scoring::main).
  • The expected output has three values and one comes from a style. The browsers' dumps measure a box's width (the vote's Width, less the call's padding and border) but no margin; width_runner takes used_margin_left and used_margin_right from the computed margin-left and margin-right all three dumps give, when each is in px and they agree to within the harness's tolerance. A box with any of the three unsettled shows no expected output. Only the call that decides the box's own width is recorded: not a float's (the engine does not ask), not a table whose columns decide its width, not a box with an aspect-ratio, and not the second call a ratio box makes for its margins.

Checked: job-check types on the types file against the engine file; new-feature-job for padding on width in a scratch directory (it also runs job-check manifest --spec on the pair); cargo test --workspace-level tests of layout, generation, jobs and harness; generated_score_check --score width (151 of 227, the floor) and the other three recipe-corpus functions at their floors; bench/checklayout-diff.sh (no change in any of the 872 pages). Layout time on crates/webengine/examples/bench.rs, release build, fastest of 100 rounds, main at 229bb228 against the branch, alternating runs, on a generated page of 10155 nested block elements with auto, fixed, auto-margin, border-box and max-width boxes: page 7.29 to 7.48 ms on main, 7.30 to 7.56 ms on the branch (about +0.5%); the 227-case recipe corpus 1.30 to 1.32 ms on main, 1.31 to 1.35 ms on the branch.

Not checked by this change: a job's model rewriting width against a new types file (the inputs_from copy is exercised only against the committed types file); the cases a job would show on measured padding pages (the page runner has run on synthetic pages, and the margin values the browsers report for an over-constrained box have not been compared across the three engines); job-check types --specification on the 10.3.3 text (the phrases in the engine file's Needed: paragraphs were read off provenance::css21_width::SPEC_TEXT, not run against it).

width after its input list #

width now takes its inputs from crates/layout/src/generated/width.inputs.json (docs/input-designer.md, "Wiring: width"). Its types, engine values and sources are the types_from_list tool's output, and its function is the tool's deliberately wrong starting candidate (every output zero) with a placeholder floor of 0 over the 227 cases, so any candidate that passes one case beats it. A width job reruns this way:

  • The definition is rewritten first. The width job on main is specs/stretch.* (feature stretch, function width), written before the list, so it still has the types-prompt, types-candidates, types-keep and types-use stages. types-use would put a model-written width_types.rs over the tool's and fail to build, as the padding run did on height before generate_with left those stages out. Before any resend, the definition is written again from its short form with the list in place: node oracle/suites/feature-queue.mjs --print short-form stretch width into a file, then job-check new-feature-job <file> --workdir <checkout>, as specs/padding.* and specs/fit-content.* were. The change is committed on main, since bench/land.sh refuses a diff inside specs/; the scheduled step (feature-loop-step.sh) writes the same shape when it next picks a width feature.
  • Nothing restores from the old run. Every stage that builds the engine lists crates/layout/src/** as an input, so the types change invalidates their stage cache, and inputs-changed.sh sees a changed stage input: a no-gain run or a score-bar landing of the width job is resent by the scheduled step on its own, and a plain submit.sh stretch counts as free.
  • The prompt and cases change. The cases show the list's inputs (computed forms, the containing block's width and direction from containing_block's answer), recorded with every box pinned to the browsers' geometry; a box with a percentage padding shows no expected output. The repair stage starts from the zero candidate.

What absolute and containing_block added to the recipe #

Both followed the same steps (absolute_engine.rs, containing_block_engine.rs, the two _types.rs, _call_site.txt and .rs files, two build.rs entries, fragment.rs calling absolute::call at both calls of layout_absolute_box and containing_block::call in containing_block_for, generation/src/absolute_page_runner.rs and containing_block_page_runner.rs as page runners, Seam::AbsolutePositioning named absolute and Seam::ContainingBlock named containing-block). They are two functions, not one: the containing block is chosen once per box at the tree root with the whole ancestor chain, and absolute then solves the box against the chosen rect, so the engine's values for absolute already hold the containing block's size. Five things differed.

  • absolute's engine values are the inputs it already had. AbsoluteEngineValues holds the 25 fields AbsoluteInputs always had, under the same names, because layout_absolute_box resolves every percentage and every intrinsic-sizing keyword before the call. Direction stays in width.rs.
  • containing_block's input is a borrowed chain. ContainingBlockInputs<'a> holds ancestors: &'a [AncestorBox] instead of the Vec the first generation loop used, so the call copies nothing (as for margin_combine's list). Rect, AncestorBox and ContainingBlockRule stay in containing_block.rs, as Direction stays in width.rs: check_names refuses a struct or enum in a types file, so a type the inputs and outputs name has to live outside it. The call records its box's owned chain through call_recording::record_with, which builds the copy only while a recording runs.
  • containing_block has a hand rule; absolute has none. containing_block::reference is CSS 2.1 10.1's four rules (resolve_reference as the resolver); its baseline stays the deliberately wrong one (a fixed box treated as static, no initial containing block fallback) and reads its three inputs directly, so each is marked Needed: in the engine file. absolute has no correct hand implementation by design (absolute.rs module doc), so its baseline reads the engine's values through a thread-local as height's does, and its page runner shows as the expected output the answer of the function as landed, on a page it lays out where the browsers put every box. An expected output for absolute therefore changes when a candidate is admitted; containing_block's does not.
  • A browser measures neither answer. getClientRects gives a border box, never the offset and margin that add up to its position (nor an auto margin), and no containing block at all. Both runners follow margin_classify_runner: a call has an expected output only when the page laid out with the stand-in matches the browsers at every box, and prompt_parts::ExpectedFrom::HandRule words the caption. For absolute the caption is loose, because the stand-in is the landed function, not a hand rule.
  • Seam::AbsolutePositioning and Seam::ContainingBlock changed runner. The first generation loops (absolute_generation_loop, containing_block_generation_loop and the *_real_model_run binaries) write these two functions' variants, so their candidates now run under the page runners, which lay a page out with every other function as landed; generated_score_check still scores the absolute and containing_block entries through absolute_runner and containing_block_runner with the others at their baselines.

The call-site files describe the two calls per box that absolute gets (the first gives the width the children are laid out against, the second, with the content height, is authoritative) and the single call per out-of-flow box that containing_block gets.

Checked: cargo test --workspace; generated_score_check --score absolute (100 of 108, the floor) and --score containing_block (106 of 106, the floor); bench/checklayout-diff.sh (no change in any of the 872 pages). Layout time on crates/webengine/examples/bench.rs, release build, 100 rounds, main at 376198ac against the branch, alternating runs, on a generated page of 7204 elements (900 relatively positioned boxes each holding absolute and fixed boxes, auto margins, percentage widths and border-box sizing): page 61.1, 61.9 and 65.2 ms on main, 63.5, 60.3 and 61.9 ms on the branch, so the difference is inside the run-to-run spread; the 227-case recipe corpus 1.31 to 1.34 ms on main, 1.34 to 1.47 ms on the branch (three runs each; the spread on the branch is wider than a two-call change explains, and it was not re-run on a quiet machine).

Not checked by this change: a job's model rewriting either function against a new types file (the inputs_from copy is exercised only against the committed types files); the cases a job would show on measured pages (the page runners have run on synthetic pages); job-check types --specification on the CSS 2.1 10.1, 10.3.7 and 10.6.4 text (the phrases in the engine files' Needed: paragraphs were read off the text, not run against it); no job was submitted for fit-content or box-sizing.

What table_auto_columns added to the recipe #

table_auto_columns is the first function made job-able that had no admitted function to start from, and the first whose feature pages are not block-only. The files are the recipe's (table_auto_columns_engine.rs, _types.rs, _call_site.txt, table_auto_columns.rs, the build.rs entry, fragment.rs calling table_auto_columns::call in layout_table_children for every table that does not use the fixed algorithm, generation/src/table_auto_columns_runner.rs, Seam::TableAutoColumns named table-auto-columns). Differences:

  • The starting file is a stand-in with no record. generated/table_auto_columns.rs answers with the function's starting candidate and has no provenance record or floor, so generated_score_check lists its entry and holds it to nothing until a job's admit stage replaces the file (the way box_generation was). Resolvers::generated() points at the file, which is how an admitted function runs. Without that file admit would write one nothing calls.
  • The inputs hold lists of the engine's own structs. cells: &'a [TableAutoCell] and declared_widths: &'a [LengthPercentageOrAuto] borrow, as containing_block's chain does; TableAutoCell lives in table_auto_columns.rs because a types file declares no struct but its inputs and outputs. The stand-in reads the engine's values through a thread-local that holds an owned copy (OwnedValues), so it works whatever the types file holds; the copy costs one allocation per table.
  • A browser measures cells, not columns. The runner reads a column's width and x off a cell that sits in that column alone, in every cached engine, and shows an expected output only when the engines agree and every column has such a cell.
  • The feature's pages are tables. oracle/suites/features/table-auto-columns.json is hand-written (a derived file would have no allow_elements): feature-pages.mjs takes allow_elements (body elements allowed besides the default ones) and strip_elements (elements removed with their content, for the checkLayout script and the paragraphs that describe a test), and /css/css-tables/ is in suites.json wpt.sparse. Of the twelve pages the file names, seven pass the selector today; the rest hold text.

Checked: job-check types on the types file against the engine file; job-check new-feature-job for table-auto-columns (it also runs manifest --spec); the layout, generation, jobs and dom tests; node --test oracle/suites/feature-pages.test.mjs; checkLayout unchanged on all 872 pages.

Not checked: any stage of the job past new-feature-job (no job was submitted, and feature-rules/feature-map have not seen the feature name, which is not a web-features id); job-check types --specification on the CSS 2.1 17.5.2.2 text (no Needed: phrase was read against it); the page runner on measured pages (it has run on synthetic ones); a model rewriting the function against a new types file.

What table_grid_rows added to the recipe #

table_grid_rows followed table_auto_columns (table_grid_rows_engine.rs, _types.rs, _call_site.txt, table_grid_rows.rs, a stand-in generated/table_grid_rows.rs with no record, generation/src/table_grid_rows_runner.rs, Seam::TableGridRows named table-grid-rows, oracle/suites/features/table-grid-rows.json of nine selected pages). It is called second, after every cell is laid out at its columns' width, so a call's cell heights depend on the columns function as landed; the runner records with that function as it ships and the rows stand-in. The browsers' answer is read off the tr boxes, so a table with a generated row or a caption shows no expected output. Checked and not checked as for table_auto_columns.

Shipped features only #

The loop writes or sends a feature job only for a feature at least one of Chrome, Firefox or Safari ships. Browsers measure the cases a job scores against, so a feature no browser ships has nothing to measure; and a draft feature's text moves too much to implement.

Where the data comes from. oracle/suites/shipped.mjs reads web-features data through oracle/suites/web-features-data.mjs, the one reader the web-features map shares: the share's fresh build (<share>/web-features/data.json, built from the head of the web-features repository's forge mirror by bench/nas-refresh.sh web-features, docs/infrastructure.md -> "web-features data") when WEBENGINE_LANE_SHARED has one, else the web-features npm package pinned in oracle/package-lock.json. Fresh data matters here: a feature a browser has just released must not wait for a lockfile bump. The per-feature status.support, and status.by_compat_key[<key>].support, are derived from MDN's browser-compat-data and name a browser only for a released version, never false, null, a preview or a flag; browser-compat-data is therefore read through web-features, with no checkout of its own. The feature ids of the queue are web-features ids, so no mapping through specification addresses is needed. Each pass logs which source and version it used (feature-queue.mjs writes shipping data web-features <label> from share|npm to stderr; the map records the same label in inputs.webFeatures).

Rules (shippedStatus):

  • A feature ships when status.support names a release for Chrome, Firefox or Safari. Edge and the mobile browsers add nothing.
  • Else it ships when any one compat key it groups names such a release. A feature whose keys ship piecemeal (anchor positioning: the whole feature only in Safari 27, most keys in Chrome 125 and Firefox 147) ships: the browsers can answer the cases of the keys they have.
  • A feature with no web-features entry (an id the loop split off, such as physical-properties-absolute) is held: it has no shipping data, and the choice is internal to the engine, so the rule takes the smaller change; a feature that matters gets a web-features id or a feature file that names its own.

Where it applies. feature-queue.mjs build: a feature of the function, blocked or hand route that is not shipped leaves ranked and next, and is listed in docs/feature-queue.json held_unshipped with its reason; nothing is dropped silently. jobs/scripts/resend-due.py due reads that list at the base commit and never sends a held feature's definition, which covers a first send, a resend after no-gain or a score-bar landing, and the resend of a specification change below. Verification-only credit is not a job and is not held. feature-queue.mjs and shipped.mjs exit 2 with neither the share's build nor the package: the pass must not rank on a rule it cannot apply.

Engine count and the feature states #

web-features is the map of what the engine implements and in what order; WPT has large gaps and Baseline covers only newer features, so neither alone is the list. engines (shipped.mjs shippedStatus(...).browsers.length) is how many of Chrome, Firefox and Safari ship a feature (the whole feature, else any of its compat keys). Both the features to triage (feature-queue.mjs --print untriaged, untriaged()) and the features to send jobs for (rank(), so next) are ordered by engines first (3, then 2, then 1), and inside a tier by the earlier rule: most WPT pages for triage, most fixable failing pages for jobs. A feature that needs a lower tier waits until the higher tier has nothing to triage or send.

docs/feature-queue.json features lists every web-features feature (entries of kind moved or split excluded) with engines, pages and one state (classifyFeatures):

  • eligible: its WPT pages are all under css/ (the engine's layout is the one subsystem that runs WPT pages) and there are at least min_pages of them; triaged says whether a record exists. The test is what the engine and triage can run, read from the pages' directories, not a list of names.
  • blocked: the engine has no subsystem for it. group says why: wpt:<top directory>/ when its pages include a directory outside css/, or compat:<area> when it has no pages and its compat keys are not all css.* (html, api, javascript, and so on).
  • needs_tests: eligible by kind (css), but fewer than min_pages pages, none included. pages is its WPT pages plus the generated tests the daily batch kept for it (generated_pages, docs/wpt-gen.md); a feature with enough kept tests leaves this state and becomes eligible. This list is the input of that batch.
  • unshipped: no engine ships it (the same set as held_unshipped).

min_pages is 3 (MIN_PAGES): below it one page decides a third or more of the feature's score, so a job's result says little. Counts by engine count and state, and the blocked reasons, are in feature_counts, and docs/dashboard.json feature_queue copies them.

The daily batch (jobs/scripts/wpt-gen-batch.sh, docs/wpt-gen.md) writes tests for the first few needs_tests features in this order, runs them in Chrome, Firefox and Safari, and keeps a test only when at least two of the three pass completely. The queue counts the kept tests as pages on its next run, so a feature with enough of them is ranked for triage and a job instead of waiting for WPT pages. The batch runs from jobs/scripts/feature-loop-schedule.sh, once a day and skipped when no lane answers; it is separate from a feature job and changes none of the job stages.

A changed specification reruns the job #

An admitted function records the hash of its specification text (spec_text_hash) and of its definition closure (definition_closure_hash, docs/provenance.md). After the hourly specification refresh the share holds the current sections, and each pass of feature-loop-schedule.sh runs jobs/scripts/spec-change-resend.py:

  1. For each feature job whose function has a provenance record made from the feature's own section (record spec_url equals the feature file's specification.section), the spec_hashes binary (crates/provenance/src/bin/spec_hashes.rs) computes the two hashes from the share's sections, the way specification_text does for a job's folder. A record made another way (the hand-written and fixture-based ones, whose hashes are of a constant's text) cannot be recomputed from the share and is left out.
  2. A difference is a change. docs/spec-changes.json keeps the fresh pair and the day it was first seen, per feature. A pair that differs from the one kept restarts the wait, so a section still being edited, or changed and reverted, never reaches a rerun. The kept entries survive across passes because the file is committed with the pass.
  3. A pair that has stood for 3 days rewrites specs/<feature>.md: front matter key specification-revision takes the first 12 characters of each hash. The new definition is a new version for the existing path: resend-due.py answers "its definition changed since the run", and submit.sh does not see the old landing tag. A feature that is not shipped keeps its entry and is not rewritten.
  4. The send passes JOBS_RERUN=fetch-specs,specification-text when spec-change-resend.py --due <feature> says the entry has waited, because the stage cache keys on the feature file, not on the share's text, and would replay the old text.
  5. The usual gate decides whether the new candidate is admitted. A function admitted from the new text records the new pair, the entry goes at the next pass; one the gate refuses keeps its entry and is resent only within the resend budget (3, resend-due.py).

The wait is 3 days: same-day reverts and "premature change" reverts occur (docs/spec-change-flow.md), and three days keeps a change through a weekend's edits without leaving a real change idle for a week. Not done: leaving a draft-maturity section alone (item 4 of the lifecycle changes), and normalizing before hashing (item 1): the hash is over the readable text, so a change to a note or example reruns the job and the gate (a run that finds nothing better ends no-gain, which resend-due.py does not resend until a pipeline input changes). jobs/scripts/spec-change-resend.test.sh (run by jobs/tests/spec_change_resend.rs) covers the wait, its restart, the rewrite, a held feature, a record from another section and the entry's removal.

Where a model is still called #

  • Candidate and test-page requests (request_candidates inside a job): the product.
  • review stage (pi-review.sh): advisory in the template; judging a function's code is not a script.
  • Text of a job definition: none; generated from the short manifest form.
  • Pick, route, queue, hand-written list, feature files: none (feature files are derived, settled decision 1; a derived file can pick a wrong spec section, and a hand-written file overrides it).

Settled decisions #

  1. Feature files are derived. The WPT pages come from WEB_FEATURES.yml and the specification sections from the web-features data; a hand-written oracle/suites/features/<f>.json only overrides the derived one. Otherwise the queue stops at every feature nobody wrote up.
  2. Job definitions are generated from one short form in the manifest code (jobs/src/manifest.rs), not copied templates, because copies drift when the pipeline changes. The pair specs/<feature>.md and .job.json is still written, with the short form expanded by the generator, so every tool reading a manifest sees the full stage list.
  3. Verification-only credit lands unattended. It rests on measured pages and is rechecked after every landing (bench/after-land.sh).
  4. Functions are made job-able one at a time; there is no function lock yet. The picker never queues two jobs for the same function at once, which avoids building the lock until concurrency needs it.
  5. The pass reports to the job dashboard through events only. Queue order, triage progress, held jobs, resent or lost runs and generated task files are posted as job events (docs/job-events.md, loop and queue kinds) by feature-loop-schedule.sh, scheduled-triage.sh and poll-and-land.sh, each sent only when its state changed. The live page and the published snapshot then fold the same log, and the page infers nothing from files it cannot read.
  6. A pass that pushed publishes the status snapshot. feature-loop-schedule.sh ends by running publish-status.sh, which publishes only when the snapshot changed and does nothing, successfully, without credentials in the environment (docs/job-events.md, "Publishing a snapshot"). A failed publish is logged and never fails the pass.

Build order #

  1. Built. oracle/suites/feature-queue.mjs (tests: feature-queue.test.mjs) reads corpus/*-triage.json and writes docs/feature-queue.json and docs/hand-written-layout.md. On the committed records, physical-properties and physical-properties-absolute are verified and box-sizing and fit-content are on the hand-written list, as expected. --print untriaged lists CSS features with no record.

  2. Built. Verification-only credit: job-check verify-credit <record> (jobs/src/feature_rules.rs verify_credit), applied to physical-properties: its eight keys now point at the record and the map snapshot is at schemaVersion 2. A key whose rule already cites another triage record that still verifies it stays with that record. css.properties.top is tagged by both physical-properties (more pages pass) and physical-properties-absolute; it stays with physical-properties, so a pass of the loop does not move it back and forth.

  3. Built. The short form: jobs/src/feature_job.rs generate and job-check new-feature-job; its expansion of the aspect-ratio short form equals specs/aspect-ratio.job.json (jobs/tests/feature_job.rs).

  4. Built and run once. Feature file derivation: crates/wpt-votes/src/derive.rs derive and the bin derive_feature_file; jobs/scripts/feature-triage.sh takes a feature name to a triage record. See "The first real run".

  5. Built. jobs/scripts/feature-loop-step.sh [--apply] [--triage <n>]: one pass of the front end in a track worktree. It never commits a job definition, lands, or sends.

    A hand-started task named after a web feature (tasks/<feature>.md) would sit beside the feature's job pair, which crates/harness/tests/spec_lint.rs refuses and so fails every landing. The step therefore checks tasks/<feature>.md before writing a pair. When a spec/<feature>/<sha> tag exists for the commit that last changed the task, the task has landed and is only a record, so the step removes it with the pair (the schedule commits both together). Otherwise the feature is passed over with a log line, because the tick may still be working the task, and the next feature in the queue is taken.

  6. Built for absolute, containing_block, height, margin_classify, margin_combine and width. The recipe is under "What making a function job-able took". Each is its own track: it rewrites the function's call in crates/layout/src/fragment.rs to record its values per node, adds the four function files and a page runner (origin/track/physical-properties-job is the pattern for relpos, about 1,700 lines), and the result is only checked by a job on folknet. It is kept out of this track because it conflicts with every other change to fragment.rs.

  7. Built: the schedule. A cron entry on the development box (jobs/scripts/feature-loop-schedule.sh install) runs feature-loop-step.sh --apply --retriage 0 --limit 1, puts the definition on the base branch, calls submit.sh, and keeps one triage running on a build lane (below). The pass itself writes nothing outside its worktree and the jobs state directory.

    The daily wpt-gen batch has its own cron entry (jobs/scripts/wpt-gen-schedule.sh install) since 2026-11-11, and runs no longer inside the pass: its ~30-minute send once held the pass's job lock for it once a day, so the dashboard showed a stalled pass and the later passes piled up behind the flock. The batch (jobs/scripts/wpt-gen-batch.sh, docs/wpt-gen.md) takes the next needs_tests features, runs their tests in the three browsers, keeps the tests at least two pass under corpus/wpt-generated, and commits and pushes them the way the pass does; the pass only reads the batch's stamp ($WPT_GEN_STAMP) and logs whether today's batch has run. An attempt is skipped when today's batch already ran, when the lock is held (a pass, a poll or a landing; the next firing retries) or no lane answers, and posts its own job events (the pseudo-feature wpt-gen-batch).

    The path from a definition to a landed function, as the scripts read it today:

    • submit.sh <name> reads specs/<name>.md and .job.json from the base branch tip in the primary checkout (which must be on the base branch and clean), and requires that tip to be on the forge; it never pushes. So the definition must be committed on the base branch and pushed before the send.

    • bench/land.sh cannot land the definition: it refuses a diff inside specs/, and it writes the spec/<name>/<sha> tag at landing, after which submit.sh refuses that version of the definition. The tag belongs to the job's own landing.

    • Landing needs no session: tracks.json specWatch.pollScript makes the 5-minute spec-watch tick of the primary checkout run jobs/scripts/poll-and-land.sh, which lands a passing run through bench/land.sh and records a failed or needs-person run (result.json log_tail).

    • The scheduled step (jobs/scripts/feature-loop-schedule.sh) commits the definition straight onto main in the primary checkout, pushes main, and sends the job. Reason: the pipeline only sends a definition that is on main (submit.sh), and bench/land.sh cannot land one, so a definition written on a track has no other way to a run. It refuses, sending nothing and logging why, when the primary checkout is dirty or not on main; it works in a throwaway worktree and fast-forwards main only after the commit exists, and takes the poller's lock so a landing and a pass never overlap.

    • A resend the pass makes because the manifest or a stage input changed (or main moved after a conflict) starts afresh at main's tip on the forge of that call, not on the forge its record names: the pipeline change at the tip is what the rerun tests, and a record made on a test forge would otherwise refuse the tip. A plain resume after a failed stage keeps the record's forge and base. resend-due.py says which in its reason.

    • Triage records come from the schedule too (jobs/scripts/scheduled-triage.sh, scheduled-triage.test.sh run by jobs/tests/scheduled_triage.rs). Without them the queue runs dry: only features with a record rank, and step 4 sends no definition without one. After its push a pass starts one triage in the background, from the new main, in a worktree under triage/ in the jobs state directory: bench/on-lane.sh --lane-only --pull <files> <worktree> jobs/scripts/feature-triage.sh <feature>, tried on the configured lane and then on each lanes[] entry of bench/lane.local.json while none answers. A lane on localhost is the development box and is never used, since the triage measures pages in the browsers. The files copied back are corpus/<feature>-triage.json, the feature file and oracle/suites/suites.json. The triage measures pages into corpus/<feature>-triage-{train,held-out}-ground-truth, never into a feature job's corpus/<feature>-wpt-held-out-ground-truth, which a lane links to the shared copy and which the measuring refuses to replace. The run works in the triage worktree, not in the directory it was started from: the pass starts it from a throwaway worktree that it removes at once. A lock held by the running triage keeps it to one at a time, so no feature is ever triaged twice at once. The next pass, before ranking, applies those files to its worktree and commits them with the queue (feature loop: triage <feature>), so the feature ranks in that same pass. The feature taken is a landed feature whose record predates its landing first, then one with a definition and no record (stretch), then the untriaged feature with the most WPT pages. Reason for the second: triaging such a definition is a smaller change than sending definitions without records, and the record is what the queue and the failure list read. A run no lane answered (on-lane exit 3) costs nothing and is started again; any other failure, a record that does not apply to main included, counts, and a feature with three is put under triage/skipped/<feature> (why, and the log's tail) and passed over until that file is removed. Reason: a lane outage must not use up a feature, and a feature whose triage always fails must not hold the queue. feature-loop-schedule.sh run --dry-run names the triage a pass would start.

    • A job whose candidates never beat the engine's current function (its failed rounds are used up, or a round adds no train case) closes by itself with the outcome no-gain; no person is waited on, since nothing there is a person's decision. The poller writes logs/<name>/<run id>-no-gain.json in the jobs state directory (run-data.py no-gain): the best candidate's and the current function's train scores per round, the review's known failures and the job's triage record (corpus/<name>-triage.json) when there is one, and the train cases the best candidate still fails. The scheduled step (feature-loop-schedule.sh) resends a no-gain job by itself once its definition, its manifest or a stage input changed since the base it ran at (inputs-changed.sh), since such a change (a scorer fix, say) is what can turn the outcome and the resend is free; until then it is not sent again. A plain submit.sh <name> before any change resends it like a stopped job and counts it as a failure.

    • Two more cases are resent by the scheduled step once main moved past the base the run started at, as a restart at the base tip (the stage cache restores each stage whose inputs did not change), so the rerun competes against the function now on main. A landing that admitted nothing (the review failed and the job landed on the score bar alone, record message review failed, landed on the score bar, run record review_advisory: true; score-bar-landing.py) would otherwise stay stuck: its tag exists, so the step sees it as landed, and submit.sh refuses a landed record. Unlike a conflict, it is resent only once its manifest or a stage input also changed, as a no-gain job is: such a landing leaves the engine's function as it was, so under unchanged inputs every stage restores from the stage cache and the rerun stores the same candidate (fit-content, run 034nfPavjZavHnNfY9AbTQ). The rerun must beat the landed function or it closes no-gain and waits as above; when it lands, the old tag is kept as archive/spec/<name>/<commit>-score-bar and bench/land.sh writes the new one. A conflict outcome (another job landed into the same files first) is resent the same way; it stays in docs/feature-failures.json until the resend clears the record. Both resends count towards the three of submit.sh below. The scheduled step never sends a job while another open job changes the same generated function file (touches naming crates/layout/src/generated/<function>.rs): submit.sh refuses it with exit 4 under JOBS_REFUSE_SHARED_TOUCHES=yes, and the step passes to the next definition. Reason: both jobs write that function's fixtures, so the second to land can only conflict. The step also sends nothing while no lane is healthy (bench/lane-health.sh: not disabled, ssh and Dagu answering, the preflight floor of disk free, a fresh inventory): submit.sh exits 5, the step ends its pass without a record or a failure task, and a later pass tries again. A run whose lane filled up after the pick ends at its first step (clean), is recorded as "lane full, not tried", and is sent to another lane without counting as a resend or a failure. Deleting on a lane needs a verified copy on the share (docs/infrastructure.md "Cleaning a lane"). needs-person stays for what AGENTS.md says waits on a person (credentials, money, hardware, a login, publishing outside the rig).

    • A feature whose job ended failed, no-gain, needs-person, refused or conflict is listed in docs/feature-failures.json (written by the step from the job records: feature, outcome, run id, message, and result/<name>/<run id>, the tag whose result.json log_tail holds the failing stage's log) and in docs/feature-queue.json failed. The picker never takes such a feature again by itself (a no-gain one excepted, above), and its function no longer counts as busy, so failures surface in one place and do not block other features. A person resends or removes the record to clear it.

    • A resend (submit.sh) is refused after three counted resends, and only a resend under unchanged conditions counts: one sent after the job definition, the manifest or a stage input (the pipeline code a stage lists) changed, or after an infrastructure failure sent by hand, is free (the schedule's own resend of an infrastructure failure counts, so a lane that stays broken is not resent for ever). An infrastructure failure whose recorded lane is no longer in dagu_lanes is free and sent even when the three are used up: the rerun goes to a different lane, so it no longer has the conditions the failed run had. The lane list is read where submit.sh reads it, from the primary checkout's bench/lane.local.json even when the check runs in the schedule's throwaway worktree (resend-due.py lane_checkout): that file is untracked, so the worktree has none, and the pick's default [0] there would call every real job lane dropped. Reason: the lane, not the job, caused the failure (aspect-ratio, run 034oJASBXSv0EOcVrio5VD: the run was sent to the development-box lane 2, whose mirror reads the box's own forge rather than the rig the loop pushes, so prepare there reported BASE_SHA ... is not on the forge), and once that lane was dropped from dagu_lanes the cap would otherwise leave the job failed for ever. A fetch-specs stage that fails only because a cited section is not on the NAS share yet (the feature loop sends a new feature file's job before the hourly refresh fetches the section) is an infrastructure failure too, so it is resent and gets no failure task. Reason: thousands of jobs share one pipeline, so a pipeline fix must not use up their budgets. The record's failure names the cause (infra, job, landing). The full output of a landing that did not land, and of a failed run step, is kept under logs/<name>/ in the jobs state directory and named in the record's message. A refused landing is tried again by the poller once the base branch's tree has changed.

    • A run that made no progress. A job can close landed (or checked) and still leave the engine as it was, and only its records show it. Every pass of the scheduled step, before its commit, runs jobs/scripts/stall-tasks.py, which reads each feature job's last closed run (the job record once it has an outcome, else the newest runs/<name>/*.json) and writes jobs/generated-tasks/<feature>-stall.md when any of these holds:

      • the store stage stored nothing new: the record message says nothing to merge, or result.json authorship has no commit by the store stage (fit-content, run 034nfPavjZavHnNfY9AbTQ). The authorship reading applies only to a run with a store stage (its result.json stage list, else the job definition): a job that stores no candidate has none, so a missing store commit is not a stall. A measurement-only job such as logical-properties (run 034oP4z95ZUzSaqi9wd1TB, whose only commit is the writer's) would otherwise be flagged for storing nothing. The record message remains evidence on its own, since the store stage prints it;
      • the last review failed (verdict fail, or verdict_was fail with advisory) and asked for no round (rework false; from the run history alone, fewer than two rounds), with failed rounds left (padding, run 034nZ6IZz548kqDeL78oNj: rework_reason "the review names no usable wrong input (0 found, 0 refused, 0 unreadable ...)");
      • every stage that calls a model (in result.json, a stage with a role, or of kind review or writer) has attempts 0: each was restored from the stage cache or skipped, so nothing in the run could produce a new answer;
      • the run step's log says outputs not stored in the stage cache. That log is in the jobs state directory only when the poller kept it (logs/<name>/<run id>-run.log, a failed run step); otherwise this signal is not read.

      Each signal is a yes or no with no count to tune: one candidate stored, one round asked for, or one model stage run is enough for the run to have had a chance at progress, so the threshold is the smallest one. A signal whose source is missing (no result tag, no run log) does not fire, so a run is never flagged on a guess; with --fetch the step fetches a missing result tag from the record's tag remote first. Failed, no-gain, refused and conflict runs are not read: they are already in docs/feature-failures.json.

      Two pipeline rules keep a run like fit-content's out of that list. The stage cache key holds the job definition the run was sent with (the spec's blob id and the manifest), so a resend after either changed reruns the stages that call a model instead of restoring the earlier answer (docs/autonomous-loop.md → "Reusing a stage whose inputs did not change"). And the store stage exits 1 when its base already holds the candidate and the job committed nothing, rather than passing with its "already stored; nothing committed" line, so a run that would store nothing new fails instead of closing landed with nothing to merge.

      A run is a stall only when nothing will rerun it, so a run is not flagged when a newer run of the feature is open, or when the schedule resends it. Both the schedule's step 4 and this pass-over ask one predicate, jobs/scripts/resend-due.py due(): the record's outcome is one that is resent (no-gain, checked, a landing on the score bar alone, or conflict), its manifest or a stage input changed between its base and main (jobs/scripts/inputs-changed.sh inputs_changed; for a conflict, main moved past its base), its counted resends are under the cap of 3 (or its last run's lane is no longer a job lane, for an infra failure), and no open job changes the same generated function. A checked run is resent like a score-bar landing: a pipeline change since then is what the rerun tests. A run the schedule cannot send (resends used up on a lane still in use, or an unchanged pipeline) is not passed over: it gets its stall task, or its failure task (jobs/scripts/failure-tasks.py). The rerun, not a writer, shows whether a pipeline change fixed it; a writer sent first could only find that change again. With --dry-run the script prints each run it passes over this way and why. jobs/scripts/resend-due.test.sh (run by jobs/tests/resend_due.rs) covers a checked run with changed inputs, one with unchanged inputs, a capped one, a held one, a capped infra failure on a lane still listed and on one no longer listed (also from a linked worktree), and that the pass-over agrees.

      The task names the run, its lane, each signal with the record fields quoted, where the records and logs are, and the goal: find and fix the pipeline cause so the next run of the feature can make progress, generically, writing no web rule. Its touches are jobs/**, crates/generation/** and docs/**. bench/** is left out because bench/land.sh refuses every diff there (and spec_lint refuses such a touches); a fix that needs bench/ is written up for a person instead. A file that names the run is left alone, so a run is flagged once. A file that names an earlier run is replaced only once its current version has landed (spec/<feature>-stall/<commit>) and the new run was sent at a base holding that landing; until then its writer is at work or the run never had its fix. The check only reads the records, and a pass that cannot run it logs that and goes on. jobs/scripts/stall-tasks.test.sh (run by jobs/tests/stall_tasks.rs) covers each signal, a healthy run, a run with a newer run open, a run whose stage input changed on main, and a second pass.

    • A job nothing resends by itself. A job that ended failed, needs-person, or landed on the score bar alone with its three counted resends used up (submit.sh refuses it every pass; records.py failures lists it as outcome capped) would otherwise sit in docs/feature-failures.json with no one reading it, and, for the capped one, be refused again by every pass. Three things change for all of them:

      • it holds no function: busyFunctions() skips every listed feature, so another feature may take the function (padding capped held height, which fit-content and aspect-ratio need), and next() does not pick the listed feature itself. Its other functions wait with it: the job definition is one file per feature, so a second job for the feature would replace the first, and the smaller change is to leave the feature to its task;
      • the pass does not stop at a definition submit.sh refuses for the resend budget; it logs that and tries the next definition;
      • every pass, after the stall check, runs jobs/scripts/failure-tasks.py, which writes jobs/generated-tasks/<feature>-failure.md for each such run: the outcome, the record's message, the review fields that explain a score-bar landing, the last lines of the failing stage's log, where the records are, and the goal (fix the pipeline cause generically, no web rule). Its touches are jobs/**, crates/generation/**, docs/**. A run whose inputs-list gap already has its jobs/generated-tasks/<function>-inputs-list.md, and a failed run whose failure is infra and that the schedule will resend (while its resends are under the cap, or on a lane no longer in dagu_lanes even at the cap: resend-due.py due answers the lane part, so the two cannot disagree there) gets none: the schedule sends an infrastructure failure again (resend-due.py, at the base tip when main moved, counted against the same cap of three; submit.sh JOBS_COUNT_INFRA=yes), and once the cap is reached on a lane still in use the run gets its task like any other failed run. A lane whose copy to the NAS fails no longer stops a job: prepare leaves the tar on the lane's share for the next archive-to-nas.sh pass and carries on. Written once per run and replaced by the same rule as a stall task (spec/<feature>-failure/<commit> landed in the new run's base). jobs/scripts/failure-tasks.test.sh (run by jobs/tests/failure_tasks.rs) covers each outcome, a job with resends left, an infra failure, a second pass and the replacement rule.
    • A triage with no measurable page. When page selection keeps no page (every page of the source is rejected, for example script tests under denied:<script), feature-triage.sh writes the record anyway: pages empty and no_measurable_pages with the source folder, the count of rejected pages, the rejection reasons and the hash of the feature file. The queue routes it as skipped (no page of the feature file is measurable), and needs_triage lists the feature again only when its feature file no longer hashes to that value. Such a record is a finding, not a failure, so it does not count towards the three failures that put a triage under skipped/. A marker under skipped/ (three real failures) holds the pipeline id of when it was written (pipeline_id in scheduled-triage.sh: the blobs of derive.rs, feature-triage.sh, feature-pages.mjs and normal-flow-pages.mjs) and is cleared, with its failure count, once any of them changes, so a pipeline fix retries the feature without hand work. The derived feature file's source folder is the one with the most pages that are not in a parsing or idlharness folder (script tests), falling back to those only when the feature has no other page (derive.rs derive): logical-properties took css/css-logical/parsing/, whose 54 pages are all script tests.

    • An inputs list the engine cannot read. A job that designs a list ("Piece 2", "Inputs-list stages") fails at inputs-keep when the validator refuses every reply, and at inputs-use when no kept list is read by the call site, builds and passes the inputs check. Where the refusal is one the structure, not the model, can fix (a source kind, style property, measured metric or element, engine value or other function's answer the format does not list; a source with no reader in types_from_list; a call site that does not read the function's values through <module>_sources.rs), the stage prints an inputs-list gap: line for it (input_designer.rs is_source_gap, jobs/scripts/inputs-use.sh). Every pass of the scheduled step, after the stall check, runs jobs/scripts/inputs-list-tasks.py, which reads each such job's last closed run the way the stall check does and, for a failed run whose failed stage is one of these two, collects the gap lines from the kept run log (logs/<name>/<run id>-run.log), else from that stage's log_tail in the run's result.json. When there is at least one, it writes jobs/generated-tasks/<function>-inputs-list.md: the run, the gaps (home directories quoted as $HOME), and a procedure that settles each gap by AGENTS.md "Inputs of a generated function": a value the specification does not define is the model's mistake and closes the task; one it defines that the engine produces gets the smallest format addition and a reader; a call site gets its wiring; only a value no part of the engine produces waits on a person. A failure with no gap line is the model's and gets no task: the rerun asks again. Its touches leave out crates/layout/src/generated/, since the list and the function come from the job. A file is written once per run and replaced by the same rule as a stall task (spec/<function>-inputs-list/<commit> landed in the new run's base). jobs/scripts/inputs-list-tasks.test.sh (run by jobs/tests/inputs_list_tasks.rs) covers both stages, a failure with no gap, a failure elsewhere, a landed run, the history file alone, a second pass and the replacement.

The first real run #

On the development box, 2026-10-20, from a worktree rebased on the intrinsic-size commit. padding has no hand-written feature file.

  • derive_feature_file <wpt revision> padding wrote oracle/suites/features/padding.json from 359 classified test files: source css/CSS2/margin-padding-clear/, one anchored name per page, deny <script, section https://drafts.csswg.org/css-box-4/#paddings.
  • jobs/scripts/feature-triage.sh padding took about 3 minutes and wrote corpus/padding-triage.json: 355 pages scanned, 286 selected, 227 measured, 192 pass, 35 fail, none unattributed; the failures implicate height, margin_classify, margin_combine and width.
  • feature-loop-step.sh --triage 1 (no --apply) printed what it would do: triage flexbox, credit physical-properties and physical-properties-absolute, and no feature has a job to run. padding, box-sizing and fit-content are blocked: every failing page implicates a function that cannot take a job yet. The queue's next is empty until a function is made job-able, height and margin_classify first.

Fixed by the run:

  • WebFeaturesTree prefetched the WEB_FEATURES.yml blobs with a plain git fetch origin, which had no forge credentials; it goes through oracle/suites/mirror.mjs now.
  • The source folder was not in the pinned checkout's wpt.sparse. The checkout's list is now the pinned one plus every directory a feature reads (oracle/suites/sparse.mjs), so bench/nas-refresh.sh suites fills it and feature-triage.sh changes no tracked file; a triage that finds the directory missing on the share exits 4 and is not counted as a failure.
  • WebFeatures::load read the web-features data from a CDN. It reads the installed package, oracle/node_modules/web-features/data.json, which bench/nas-refresh.sh npm already caches from oracle/package-lock.json (docs/infrastructure.md → "Outside sources"); the refresh was run from this worktree and the package is in the share's cache.
  • The routing called a feature whose failures all wait for functions that cannot take a job "hand-written"; it is blocked now, and only failures no function decides are on the hand-written list, which is empty on the current records.

Seen, not fixed: the derived pages come from the WPT revision of the web-features join (bc93a431), the pinned checkout is at 26f417a8; a page missing from the checkout is not selected. feature-triage.sh finds its checkout from the current directory, so it must be run from inside the worktree.

Not verified #

  • The 0.5 threshold and the order of functions come from a handful of triage records, a small sample; they are tuned as more features are triaged.
  • A derived file takes the first specification URL web-features lists, which can be a section other than the one the rule is in; a hand-written file overrides it.
  • feature-loop-step.sh --apply has not run: no feature has a job to write. Its credit step ran as job-check verify-credit on physical-properties (committed).
  • job-check new-feature-job gives the generated manifest and a short description, for a feature whose pages are from WPT. A feature on generated pages (display-contents) has no short form.
  • Outside the loop, crates/content-analyser/src/bcd.rs Bcd::load still fetches browser-compat-data from a CDN, and crates/wpt-votes/src/bin/build_table.rs fetches wpt.fyi results; neither is used by the loop.