Turn bv update into bv self-update - #359
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@claude please review this PR. |
|
Claude finished @rdeago's task in 6m 6s —— View job Review
The rename is complete: no 1. The documented
|
A matching manifest pin proves neither that the target version is obtainable nor that it is downloaded: self-update is delegation-exempt, so the pinned version need not be the one running, or even be present on the machine. Skipping the dotnet CLI on a match therefore broke two documented guarantees in the half-updated case - the --to existence check, and the download that lets the next `dotnet bv` run. Addresses finding 1 of the first review of Tenacom#359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The parameter selects the files to edit and shapes the summary; the rewrite re-reads each file and stamps every family pin in it. The doc claimed pin-level granularity the implementation does not have, which a future caller passing a subset would discover the hard way. Addresses finding 2 of the first review of Tenacom#359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stamping this bv's own version is only the default now, and `bv --help` shows the command description before the option's own. Addresses finding 3 of the first review of Tenacom#359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reading every .cs file in the repository made discovery cost scale with the source tree - the dominant cost in a large consumer repo, and .cs files are exactly the files such a repo has most of. Discovery now reads only .cs files within the file-based-app scope: the built-in .buildvana/hooks/, plus the gitignore-syntax patterns of the new top-level fileBasedApps configuration setting, which the factory appends to the built-in scope so no configuration can hide the hooks. A declared scope also keeps the summary an honest coverage check, and it is the infrastructure bv deps needs for the same scan in stage 2. Self-update stays the repair tool: when the configuration cannot be read, discovery degrades to the hooks scope with a warning instead of failing. This repository's own buildvana.jsonc carries the setting commented out - the pinned Buildvana version rejects settings it does not know - to be enabled at the next self-update. Addresses finding 4 of the first review of Tenacom#359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Inheriting the editor's policy silently left the summary's coverage claim with an unstated hole. The call is now deliberate and on record: an override overrules a dependency update - self-update is one - so whoever writes an override owns the version and its consequences, drift out of lockstep included, and the summary does not mention what is not self-update's to move. Addresses finding 5 of the first review of Tenacom#359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Joining every phrase with plain and reads fine for two offenders and degenerates from three on; family pins make three the common failing shape rather than a corner case. Addresses a minor note of the first review of Tenacom#359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
All five findings and the join note are addressed; two went further or differently than suggested.
The @claude Please take another look. |
|
Claude finished @rdeago's task in 8m 43s —— View job Re-review
All six are addressed, and the two calls that went the other way are the right ones. Making the tool-update step unconditional is a strictly better fix than the one I proposed: it keeps one code path instead of two, and the download guarantee needed it as much as the existence check did. Leaving Two findings, both in the new scope machinery, neither blocking. 1. A configured negation can move the hooks out of scope
return json is null ? defaults.FileBasedApps : [.. defaults.FileBasedApps, .. json];
The comment right above the line says the opposite, and so do the test comment at
Emitting the built-in patterns last makes the claim true: a user negation is then overridden for the hooks path only, and every other configured pattern behaves exactly as now (the built-in pattern matches nothing outside 2. The pattern list this repository plans to declare misses
|
In gitignore syntax the last matching pattern wins, so with the built-in .buildvana/hooks/ pattern emitted first, a configured negation of the hooks scope removed the hooks from discovery — contradicting the stated guarantee that no configuration can move them out of scope. Emitting the built-in patterns last makes the guarantee hold: they override a negation of the hooks scope, and they match nothing outside it, so they can override nothing else. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The sanity-check gate .claude/tools/inspect.cs is a file-based app too: stage 2 reads the same declared scope for every package directive, so leaving it out would exclude it by omission rather than by decision. Also drop the sentence that restated the planned line right above it; the other commented-out settings state the reason and let the JSON speak for itself. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Both findings and the first minor note are addressed.
The first minor note is folded into f18e19a: the sentence restating the planned line is gone; the commented JSON speaks for itself, like the file's other commented-out settings. The second is acknowledged as stated — a no-network run succeeding only while the package is cached is the price of the download guarantee, and it was a deliberate call. @claude Please take another look. |
|
Claude finished @rdeago's task in 3m 48s —— View job Re-review (round 3)
Both are addressed, and the guarantee now holds for more negation shapes than the one I named. No new findings. Ready to merge from my side. Finding 1 — verified, and stronger than the test assertsThe flip is correct at the root: The guarantee also survives negation shapes other than the exact
The last two hold because of the ancestor short-circuit at The three tests carry it: the factory order test flipped, Finding 2 — verified
Also checked
I could not run a build in this environment; the verification above is by reading. Your gate covers the compile. Minor
|
|
The first minor note of the third review is taken in ae63115: the updater-level negation test now feeds |
A matching manifest pin proves neither that the target version is obtainable nor that it is downloaded: self-update is delegation-exempt, so the pinned version need not be the one running, or even be present on the machine. Skipping the dotnet CLI on a match therefore broke two documented guarantees in the half-updated case - the --to existence check, and the download that lets the next `dotnet bv` run. Addresses finding 1 of the first review of #359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The parameter selects the files to edit and shapes the summary; the rewrite re-reads each file and stamps every family pin in it. The doc claimed pin-level granularity the implementation does not have, which a future caller passing a subset would discover the hard way. Addresses finding 2 of the first review of #359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Stamping this bv's own version is only the default now, and `bv --help` shows the command description before the option's own. Addresses finding 3 of the first review of #359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reading every .cs file in the repository made discovery cost scale with the source tree - the dominant cost in a large consumer repo, and .cs files are exactly the files such a repo has most of. Discovery now reads only .cs files within the file-based-app scope: the built-in .buildvana/hooks/, plus the gitignore-syntax patterns of the new top-level fileBasedApps configuration setting, which the factory appends to the built-in scope so no configuration can hide the hooks. A declared scope also keeps the summary an honest coverage check, and it is the infrastructure bv deps needs for the same scan in stage 2. Self-update stays the repair tool: when the configuration cannot be read, discovery degrades to the hooks scope with a warning instead of failing. This repository's own buildvana.jsonc carries the setting commented out - the pinned Buildvana version rejects settings it does not know - to be enabled at the next self-update. Addresses finding 4 of the first review of #359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Inheriting the editor's policy silently left the summary's coverage claim with an unstated hole. The call is now deliberate and on record: an override overrules a dependency update - self-update is one - so whoever writes an override owns the version and its consequences, drift out of lockstep included, and the summary does not mention what is not self-update's to move. Addresses finding 5 of the first review of #359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Joining every phrase with plain and reads fine for two offenders and degenerates from three on; family pins make three the common failing shape rather than a corner case. Addresses a minor note of the first review of #359. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Checklist of related issues / discussions
bv dependencies, and renamebv updatetobv self-update#352Proposed changes
Fifth PR of the #352 sequence:
bv updatebecomesbv self-update, per the spec's "Related changes" and the decisions recorded on the issue.bv update→bv self-update, with no backward-compatibility alias (bv is a preview tool). The help text carries the naming nuance: canonically "self-update" means "replace my own binary"; ours changes the repository, never the binary. The delegation exemption, every error text, and the docs follow the rename.--to <version>. Stamps a named version instead of the running bv's own. A value that does not parse fails with exit 1. No package source is consulted: thedotnet tool update --versionstep doubles as the existence check — it runs unconditionally, even when the manifest already pins the target, and before any file is written, so an unknown version leaves the repository untouched.BuildvanaFamilytype owns the closed family list —bv,Buildvana.Sdk,Buildvana.Runtime; deliberately not aBuildvana.*prefix match, so a third-party package under that prefix is never dragged into lockstep. A newFamilyPinUpdaterdiscovers family pins textually — never through MSBuild evaluation, since the SDK may be the thing being changed — via theFileFinderwalk (gitignore-aware, with/artifacts/,/.buildvana-temp/,bin/,obj/,node_modules/excluded):PackageVersion/GlobalPackageReference/PackageReferenceitems in*proj/.props/.targetsfiles, and versioned#:package/#:sdkdirectives in.csfiles within the file-based-app scope (see "Additional changes" below). Literal versions are spliced in place (byte-preserving,Version-child whitespace included); non-literal versions (property references, ranges, floating) are reported and left alone, and a familyVersionOverrideis deliberately invisible (an override overrules a dependency update, self-update included). The downgrade guard now covers every parseable family pin, and names the--toversion when one was given. The summary prints one line per family pin found — unchanged and left-alone included — naming the declaring file, so it doubles as a discovery-coverage check.self-update; no BREAKING CHANGE entry, because the same section introduces the command.docs/DirectoryStructure.mdfollows.Additional pin groups (spec §"Additional pin groups") are configuration that arrives with stage 2; the scan set is already a parameter, so wiring their item names in later is a one-line change.
Additional changes
NotAccessedPositionalPropertysuppression comments onMsBuildPin.ItemTypeandAppDirective.Kind(from Add splice editors for package pins and app directives #358) claimed this PR would be their first reader; it readsId/VersionTextinstead, so the comments now namebv deps(stage 2) honestly.fileBasedAppsconfiguration setting (gitignore-syntax patterns) declares where file-based apps live, and family-pin discovery reads.csfiles only within that scope. The factory emits the built-in.buildvana/hooks/patterns after the configured ones — the last matching pattern wins in gitignore syntax — so no configuration, a negation included, can move the hooks out of scope. Introduced for finding 4 of the first review: reading every.csfile in the repository made discovery cost scale with the source tree, and stage 2'sbv depsneeds the same declared scope for its own scan. When the configuration cannot be read, self-update falls back to the hooks scope with a warning instead of failing. This repository's own entry stays commented out inbuildvana.jsoncuntil a Buildvana version that knows the setting is pinned here — the pinned SDK validates the file at build time and rejects settings it does not know.Types of changes
This pull request introduces the following types of changes:
.gitattributes,.gitignore)Breaking changes
This pull request introduces breaking changes:
Checklist
🤖 Generated with Claude Code