Repository navigation
Every file a generator changes is committed, generated tasks it settled are done, and a finished run always opens a PR - #358
Merged
Conversation
…ed are done, and a finished run always opens a PR A run's typegen (run from apps/studio, writing ../web/.../sanity.types.ts) changed two files in the sandbox; the worker committed one and reported "regenerated 1 file(s)". The other, the generated types file, was over the 5 MB per-file cap and was skipped with a log line that didn't name it. The proof check then called that file's task not done and the run ended with no pull request, 32 of 33 tasks done. - The sandbox's changed files come back whole (cap 50 MB, 200 files); a file past a cap is named in the outcome, never dropped silently. The generator gate reports such a run as a tooling failure naming the file, and the coder's run_codegen says it. - Generator paths are normalized (`..` resolved) everywhere they are compared: outputs, globs, plan task paths, the diff. - A generated task is done when its generator ran to the end with its output committed, or verified up to date: the generator gate returns what it settled; the plan check's record, the proof judge's context and a filter on its planned-work findings all use it. - Planned work the proof check still finds after its fix round no longer ends the run: the pull request opens as a draft with it in a "Not finished" section at the top, and stays a draft while it is there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A new-feature run finished 32 of 33 planned tasks and still ended without a pull request. The open task was the generated types file, which the studio's typegen writes from
apps/studioto../web/src/lib/sanity/sanity.types.ts.The generator check ran typegen in the sandbox. The build finished with exit 0 and listed two changed files,
apps/studio/schema.jsonandapps/web/src/lib/sanity/sanity.types.ts. The worker committed one of them and reported "regenerated 1 file(s)". Its log shows why:codegen: skipping oversized changed file. The generated types file was over the 5 MB per-file cap, so it was dropped without being named. The same happened on everyrun_codegencall the coder made.The proof check then found the types file's task not done. After its fix round it ended the run with no pull request.
The path of the build output, the tar and the untar were not at fault. The changed files are listed from the repository root, so both paths were correct. The scope guard was not involved either.
Changes
Every changed file comes back, or is named (
clients/sandbox.rs,generators.rs,implement.rs)read_changed_tarreads the build's archive intoCaptured { files, dropped }.CodegenOutcome::droppedwith the reason. It is never left out silently.run_codegenresult also says which files were not committed.One spelling for paths (
generators.rsnormalize_path,plan_coverage.rs).and..are resolved in every generator output, input glob, matched path and plan task path.apps/studio/../web/...becomesapps/web/....A generated task is done when its generator settled it (
generators.rsGateOk,plan_coverage.rssettle_generated,proof.rs)drop_settled_generatedremoves any planned-work finding about a settled file.steps::Carry::generated).A finished run always ends with a pull request (
mod.rs,proof.rs,completeness.rs,pr.rs,resume.rs)proof::unfinished_section, a newSection::Unfinished).mark_pr_readykeeps the pull request a draft while the section is there.Verification
cargo fmt --all --check: clean.cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test --workspace: common 1281, gateway 605, worker 977, plus 2; 0 failed.apps/studio, output../web/src/lib/sanity/sanity.types.ts.normalize_path,underand detection giveapps/web/src/lib/sanity/sanity.types.ts; matching works whichever way the path is written; the not-run reason names the real path.