Repository navigation
Conversation
… minor cleanup (namespaces and modules)
…rencing nuget), fixed console garbling in VS, added support for substitutions in phony rules, closing database on Ctrl-C, support for Tasks in recipes
Feature/netcore
- Added new build and publish workflows for .NET projects. - Updated .NET SDK version from 7.0 to 9.0 in global.json and project files.
#2) * Enhance documentation and improve Shell command options in Xake scripts, new dependsOn function, updates sample code in features.fsx * Update samples/features.fsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/core/ScriptFuncs.fs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: olegz <oleg.zaimkin@developertools.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Refactor version retrieval in build script to simplify logic and improve clarity new feature: --resetdb flag that clears database before running build. fix: all targets requested become lowercase while parsing CLI args. Add stdout and stderr handlers to ShellOptions and update tests
* feature: NoPersist and Teardown options in ExecOptions feature: new "engine" mode for library mode * refactor: enhance file reading functions and improve XakeEngine demand handling * Deep refactoring of exec types and engine classes * few fixes based on code review * Update src/core/WorkerPool.fs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * following up review notes + more doc comments --------- Co-authored-by: olegz <oleg.zaimkin@developertools.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* feature: NoPersist and Teardown options in ExecOptions feature: new "engine" mode for library mode * refactor: enhance file reading functions and improve XakeEngine demand handling * Deep refactoring of exec types and engine classes * few fixes based on code review * Update src/core/WorkerPool.fs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * following up review notes + more doc comments * follow up more issues * Refactor error logging and improve demand handling in the engine: - fixed noPersist behavior - demand waits for prior runs of same target to complete before start - more tests to verify behavior --------- Co-authored-by: olegz <oleg.zaimkin@developertools.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* Add RuleBuilder implementing new rules definition syntax using "target" and "command" keywords * new command rules are now imperative: always executed * Update src/core/RuleBuilder.fs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix XML doc comment misassociation for `<==` operator and `needSequentially` (#8) * Initial plan * Fix XML doc comment placement: move needSequentially above the <== doc block Co-authored-by: OlegZee <513301+OlegZee@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: OlegZee <513301+OlegZee@users.noreply.github.com> * Moving new command, target(s) syntax to Xake namespace (from Experimental) --------- Co-authored-by: olegz <oleg.zaimkin@developertools.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: OlegZee <513301+OlegZee@users.noreply.github.com>
…eturn shell result code and console output
Feature/sh enhancements
* implement typed variable system with support for CLI and environment variable resolution Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…#11) Adds consistent teardown execution for CLI script runs so teardown targets run after both successful builds and build failures (including when ThrowOnError is enabled), aligning CLI behavior with the long-lived engine teardown flow. Changes: Introduces ScriptRunner.runTeardownAsync and uses it from both CLI execution and XakeEngine.StopAsync. Updates CLI runScript to always run teardown after build completion/failure, and to preserve the original build error when teardown also fails. Adds CLI-focused tests covering teardown on success, failure, teardown-failure reporting, and skipping teardown for --dryrun/--dump.
…into a layout (#49) * hermetic: Description, the project description model (xake.project.json) Type, validated JSON read, write-on-change, load/save/find/names/beside. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic.tests: Description round-trip, validation, write-on-change, find, beside/names The fixture is the draft example normalised to the writer's format. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/schemas: xake.project.schema.json, kept in step with Description by a test Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/hermetic: description.md, the project description page; README row Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: Nuget.compileItems, the compile assets of a restore graph Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: csc/fsc { project }, config, packages; Described.restore via msbuild restore A project description becomes a compilation: sources (C# masks with ! excludes kept in the resolved Csc and its lock, expanded through getFiles), defines, framework references, options, generated InternalsVisibleTo, the SDK's Debug/Release presets, --deterministic+ and --pathmap. Packages are resolved by an msbuild restore of a synthesized project and passed in with 'packages'; the compiler never resolves one. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic.tests: descriptions of src/core and src/dotnet compiled through the lock; presets, restore, C# masks Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: csc/fsc { project }, config, packages (csc-syntax, tasks, hermetic/lock) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: Lock.recorded, the record-time step without the write; project-ref outputs left unhashed Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: Locks.generateAll, one lock per described project and configuration, without compiling Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic.tests: lock generation for Xake's three projects, ref choice, kept versions and LOCK_REFRESH Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: Xake-generated locks (hermetic/lock.md), cheatsheet line Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: Locks.compileAs and Locks.needAll, the build from a lock into the script's layout compileAs compiles a lock entry into the calling rule's .dll (the -o the lock lacks, --doc: beside it), needs every reference first, expands C# masks through getFiles, substitutes $(Version) in Generated from the first matching versions mask, and replays through Lock.compileFrom (new: compileWith naming the lock), so the HERMETIC gate runs inside. needAll needs every described project's outputs; no lock fails naming locks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic.tests: build from Xake-generated locks (A -> B, C# masks, Debug without doc, determinism, HERMETIC, $(Version), Xake's three projects) The hermetic fixture gains System.IO.Compression for net462: msbuild gets it from the SDK's netstandard facades, which a description does not expand. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: building from Xake-generated locks (hermetic/lock.md), cheatsheet lines Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Locks: one-lock primitive Locks.generate; drop generateAll and ordered Lock generation moves into the script: a phony lock::<name>::<cfg> rule orders projects by need and runs from an explicit update-locks target. The library keeps generating ONE lock (kept versions, LOCK_REFRESH, ref choice unchanged); Evaluation.ProjectRefs now records the ref's name. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * LocksTests: drive Locks.generate through the phony lock rule update-locks twice (once per run, nothing rewritten), a shared reference generated once, fresh clone without .xake runs no lock rule. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: Xake-generated locks as a phony lock rule and update-locks Why phony, why alwaysRerun, why update-locks is explicit (fresh clone/CI run no lock rule); cheatsheet: the rule's key lines and getRuleMatch. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Tests: share the phony lock rule and update-locks as LockRule Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * BuildFromLockTests: generate locks via update-locks; fresh-clone build The fixtures' locks come from the phony lock:: rule (LockRule) instead of Locks.generateAll. New test: with .xake and out/ deleted, build over the committed locks of A -> B (needAll + compileAs, lock rule in the script) runs no lock rule, rebuilds nothing the second time and writes no lock. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…verbosity (#51) record's read-modify-write of the fingerprint file runs under a process-wide lock keyed by the file's full path, and the file is replaced atomically (temp file beside it, then File.Replace/Move). warn logs at Message: the Normal console verbosity shows Message/Error/Command only, Warning starts at Loud. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…re order, net462 reference (#52) * Locks.compileAs: need only project-reference outputs before the restore; net462 System.IO.Compression reference Carried over from pr/build-fsc (#50). Hashed references are packages: on an empty package folder (fresh clone, CI) needing them before Lock.compileFrom's restore failed with "Neither rule nor file". The restore fetches them, the runner needs them after. Test: a build into an empty package folder. Hermetic's fsproj names System.IO.Compression for net462 (ZipArchive in Sbom.fs, Sign.fs) so a description imported from it carries the reference. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Lock: a compiler of the .NET SDK is identified by the SDK version, not by a hash The SDK's fsc.dll (and Roslyn csc.dll) are ReadyToRun images for one OS/architecture, so a lock recorded on macOS arm64 failed the compiler hash check on linux x64 at the same SDK version. A compiler under $(DotnetRoot)/sdk/<v>/ (Lock.isSdkCompiler) is now recorded with an empty Sha256 (Lock.rehash, Project.import), and Lock.compileWith clears such a hash before the runner (Lock.withoutSdkCompilerHash), so a 0.2 lock that carries one reads unchanged and builds wherever that SDK is installed. The SDK check is the dotnet-sdk prerequisite and the compiler path, as before. Toolset-package and other compilers keep their hash. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/hermetic/lock.md: the cross-folder dll difference, described Same-folder rebuilds are byte-identical; a clone in another folder differs by 59 bytes (PE checksum, debug-directory stamps; pdbs identical) despite --deterministic+ and --pathmap. Package comparison has to go by entry content. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* hermetic 0.3.0: depend on Xake [3.7.0.26, 3.8), release notes for 0.3
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs: hermetic architecture review for 0.3
- section 1: limits for 0.3 (SDK as a prerequisite, no hash for an SDK compiler,
an import cannot choose the compiler, descriptions as a projection); stale
"only C# goes through the lock" removed
- section 2: producers and runner paths for csc/fsc { project } and Locks.compileAs;
new "Lock strictness and CI" (current behaviour, what to do on CI, a marked proposal)
- SBOM and signing removed (placeholder: to be redone in 0.4); new section 5 part
"Project descriptions (xake.project.json)"; module map with Description, Described,
Locks, Import
- section 6: server note for Locks.compileAs and fsc; SDK csc identity since 0.3
- sections 8, 9: fsc identity, bootstrap row (#50), composed target framework,
toolset package folder, range [3.7.0.26, 3.8)
- guide and csc-syntax: `out` is optional in a file rule; Lock.build described plainly
- roadmap: descriptions into the core; a CLI command to write descriptions (idea)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs: fingerprints.md names Import.descriptions and Locks.needAll; roadmap B6 marked done
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* docs: hermetic guide drops the SBOM section, uses the current rule syntax; roadmap item for section 6
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…erprints (#50) * build.fsc.fsx: declarative self-build from descriptions and locks import (msbuild -> src/<dir>/xake.project.json), update-locks (phony lock::<name>::<cfg> over Locks.generate), build (Locks.needAll + Locks.compileAs from the committed files), check (Fingerprints.check). Replaces the pre-#42 Fsproj-evaluation form and its projects/ folder. Runs on the libraries build.fsx builds (out/netstandard2.0) until a release carries Locks/Import/Fingerprints. Hermetic's fsproj names System.IO.Compression for net462 so the import carries it; .packages/ (NUGET_PACKAGES) is ignored. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Self-build: committed descriptions, Release locks and xake.fingerprints Written by `build.fsc.fsx import` and `update-locks`; `build` compiles from them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Locks.compileAs: need only project-reference outputs before the restore Hashed references are packages: on an empty package folder (fresh clone, CI) needing them before Lock.compileFrom's restore failed with "Neither rule nor file". The restore fetches them, the runner needs them after. Test: a build into an empty package folder. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * build.fsc.fsx: file log build.log (Chatty), as CI uploads it Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * CI: build-fsc job, build.fsc.fsx build check from the committed locks Next to the build.fsx matrix (the build of record, unchanged). macOS arm64 with SDK 10.0.401: the locks name that SDK's ReadyToRun fsc.dll by hash. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: the declarative build (readme), build.fsc.fsx in session notes, workflows pointer Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Scripts bootstrap from the released packages (Xake 3.7.0.26, Xake.Hermetic.Dotnet 0.3.0.28) build.fsc.fsx: #r nuget instead of out/netstandard2.0 dlls, own database .xake.fsc, no consolelog Loud (Fingerprints.warn is at Message since #51), HermeticVersion default 0.3.0. build.fsx: Xake 3.7.0.26. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Self-build: locks regenerated with hermetic 0.3 (SDK compiler without hash, Xake 3.7.0.26) import, update-locks -d LOCK_REFRESH=Xake, check: the description takes dev's Xake range [3.7.0.26, 3.8); the locks drop the fsc.dll hash and move Xake to 3.7.0.26. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * CI: build-fsc on ubuntu-latest from the packages, no bootstrap step Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: build.fsc.fsx bootstraps from the packages; portable locks; warn at Message Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…nt after a separate run) (#54) * core: ArtifactDep2 records the dependee's change stamp; database 0.5 reads 0.4 need/needFiles on a target with a rule now records ArtifactDep2 (target, stamp): the file's write time, or for a phony target its completion time (Built, now stamped at completion). getDepState counts a moved stamp as a change, so a dependee rebuilt by an earlier separate run or target group no longer leaves its dependents stale (S66). An ArtifactDep from an older database counts as changed once and is re-recorded. The database version is 0.5; a 0.4 file is read and rewritten with the new header. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * tests: stale dependent after a separate run (S66), phony stamp, database 0.4 upgrade The three repro tests of the first fix (two-step, one invocation with two groups, plain-file control), the owner's scenario (build, edit, build, pack: the package carries the new dll), a phony dependee re-run by an earlier session, a 0.4 database with ArtifactDep that loads, rebuilds the dependent once and is rewritten as 0.5, ArtifactDep2 pickling, and a 0.3 database that is discarded. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: ArtifactDep2 change stamp and database 0.5 versioning Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: keep the CRLF line endings of implnotes.md Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ics, platform TFM monikers (#55) * dotnet: ResxFormat -- .resx compiled as the .NET SDK's GenerateResource (typed values, ResXFileRef, code pages), one body for net462 and netstandard2.0 * dotnet: a compiler exiting non-zero without an error line is reported with its exit code and output; the response file is kept (S17) * dotnet: netcoreMoniker accepts a platform framework (net8.0-windows -> net8.0) * locks: Xake.Dotnet with ResxFormat.fs and System.Resources.Extensions 8.0.0 (import, update-locks) * hermetic.tests: the src/dotnet description fixture follows src/dotnet (ResxFormat.fs, System.Resources.Extensions) * docs: csc-syntax -- Resx.compile covers every GenerateResource entry kind; the System.Resources.Extensions runtime need * docs: pr1-dotnet-resx (what was taken from the night, what stays there) --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…from a description (#59) * dotnet: shared framework reference packs (DotNetFwk.sharedFrameworkReferences) Microsoft.AspNetCore.App and Microsoft.WindowsDesktop.App from <dotnet>/packs/<name>.Ref at the version the SDK's BundledVersions.props names, else that exact NuGet package; Microsoft.NETCore.App is the target framework's own pack. knownPackVersion generalizes knownTargetingPackVersion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * dotnet: project description (xake.project.json) in core: Json, Description, ProjectPlan Description is the newest schema (pr/deploy's hermetic copy) plus frameworkReferences; ProjectPlan turns a description into what a composed compilation needs, rejecting packages and projectRefs without an output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * dotnet: csc { project } and fsc { project } compose from a project description Settings get a Project field; ofSettings applies the description's plan (describedSettings) and lets explicit settings win. No msbuild, no restore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs/schemas: the core's description schema (pr/deploy's plus frameworkReferences) The hermetic package keeps reading its own copy (docs/hermetic/xake.project.schema.json) until it builds on Xake 3.9; TODO in src/hermetic/Description.fs. frameworkReferences are validated against the shared frameworks the SDK packs provide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * tests: Description round trip and validation; csc/fsc { project } against dotnet build, ASP.NET Core, rejections, precedence Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * locks: Xake.Dotnet with Json.fs, Description.fs, ProjectPlan.fs (import, update-locks); the hermetic fixture follows src/dotnet Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: description.md (fields, composed path vs hermetic, status), csc-syntax project operation, release notes 3.9 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: neutral example project name in the hermetic schema copy Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Brands in examples and test fixtures become Acme/Globex/Initech, the library repository used for verification becomes repo-a, project names become generic (CoreLib, Layout, Model); references to material kept outside this repository are reworded. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…ions, run folders, core 3.9 (#65) * Hermetic fsc build script: ask msbuild about the project, cache it, compile ourselves build.fsx is untouched. Next to it, build.fsc.fsx compiles both assemblies with the fsc task -- msbuild compiles nothing. msbuild is the only thing that reads a project file correctly, so it is asked once per project and the answer is cached in a file rule: - Fsproj.evaluate runs `dotnet msbuild -restore -t:PrepareForBuild; GenerateAssemblyInfo;ResolveReferences` with -getItem/-getProperty. PrepareForBuild is what yields the implicit define constants, GenerateAssemblyInfo writes the assembly attributes into an obj subtree of its own, ResolveReferences the full reference list; BuildProjectReferences=false keeps msbuild from building the very thing the script compiles. - msbuild's dump is 212 KB and 3641 lines per project of which one field per item is read, so it goes to a scratch file and only the consumed lists are kept: 15 KB, readable and diffable. - Sources are CompileBefore @ Compile @ CompileAfter -- for F# the SDK puts the generated AssemblyInfo.fs in CompileBefore, so it lands first, which is what makes InternalsVisibleTo reach the compiler. - The json parser is hand-written: System.Text.Json is a package dependency on netstandard2.0 and would land on every consumer of Xake. The fsc task stays thin -- against dev it gains `doc`, netstandard targeting and one --define: per symbol (fsc reads --define:A;B as a single symbol). Clean build 7s, rebuild after touching a source 6s with no msbuild run, no-op build 40ms. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Keep the evaluated projects in the repository The kept evaluation is written against $(NuGetPackageRoot) and $(ProjectRoot) and expanded again on read, so it is byte-identical on every machine. That makes it worth tracking: projects/<fwk>/<lib>.json is a lockfile for the compilation -- a diff in it means a project change really moved what gets compiled or linked. Verified: regenerating after touching both .fsproj files reproduces the files byte for byte. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Do not need a project reference the fsc task already needs The compile rule needed the referenced project's assembly and then passed it to fsc, which needs everything it references -- and a target asked for twice in one build is built twice (the WorkerPool dedup limitation). Xake.dll was compiled twice on every clean build, and its evaluation run twice with it: 3 of the 7 seconds. Clean build is now 4.2s, on par with dotnet build from equally cold state. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * One target, one execution per run A target asked for a second time after the first request had finished was built again: the pool deduped only in-flight requests (it dropped the entry when the task completed), and the "does it need rebuilding" verdict is memoized for the whole run, so the second request never asked the database and got the pre-build "Not built yet" answer. The memo cannot simply go -- it is what ties the knot of the recursive dependency analysis -- so the fix is in the pool. Finished tasks are now kept, tagged with a run number: within a run a target executes once, across runs (a new target group, another Demand) the database decides again. Scheduler.newRun marks the boundary and is posted exactly where the memo is created. Tasks still in flight are kept across the boundary, so overlapping demands keep collapsing into one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Two maps instead of run numbers in the pool Same behaviour, plainer statement of it: `running` is shared by whoever asks whenever they ask, `finished` serves the rest of the run and is emptied when the next one starts. That drops the run counter, the per-entry run tag and the IsCompleted checks; Done goes back to carrying just the keys and moves the entry from one map to the other. The one difference from the run-numbered version: a task that finishes after a new run has begun serves that new run as well, instead of being re-checked against the database. That is the same thing that already happens when a run joins a task still in flight. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Session notes: the engine fix, and honest numbers The pool change belongs to this branch, so the full story moves into its section and the old limitation entry becomes a pointer. Timings re-measured from cold after the fix: the fsc build is on par with dotnet build, and the row where it is not is the one where msbuild only copies out of its warm obj/. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Add CscInvocation and ProjectImport tests - Introduced `CscInvocationTests.fs` to validate the behavior of the C# compiler invocation through the Xake build system, including checks for generated files and reference tampering. - Added `ProjectImportTests.fs` to test the functionality of project imports, including argument parsing, path resolution, and lock file generation from MSBuild output. - Updated `Xake.Dotnet.fsproj` to include the new `Project.fs` file. - Modified `tests.fsproj` to compile the new test files. * feat(hermetic-build): implement lock retrieval from composed csc settings - Introduced `lock-from-settings.md` to document the process of obtaining a lock from `csc {}` settings, detailing scenarios for recording, replaying, verifying, and updating locks. - Made `Csc.resolve` public to facilitate lock recording and verification, ensuring it cleans up temporary files. - Enhanced `Dotnet.csc.fs` to support both invocation and composed modes, ensuring consistent project resolution and compilation. - Updated `tracker.md` to reflect the new lock handling features and migration paths for existing `csc {}` configurations. - Improved handling of environment variables and temporary files during compilation, ensuring proper cleanup and environment setup. * feat: implement `fromlock` mode for `csc {}` and enhance toolset integration - Updated session documentation to reflect the addition of `fromlock` mode and toolset compiler source. - Modified `tracker.md` to track progress on `fromlock` mode and toolset compiler source. - Added README for hermetic samples, detailing toolset and repo-a directories. - Created sample project `Toolset.csproj` to demonstrate compiler pinning via `Microsoft.Net.Compilers.Toolset`. - Implemented `FromLockTests` to validate `csc { fromlock }` functionality and ensure generated inputs are written correctly. - Developed `ToolsetTests` to verify toolset compiler integration and compilation processes. - Refactored `DotNetFwk.fs` and `Dotnet.csc.fs` to support toolset compiler retrieval and usage. - Updated `Project.fs` to correctly derive compiler paths from `CSharpCoreTargetsPath`. - Enhanced argument parsing in `CscArgs` to handle quoted paths and aliases correctly. * Resgen for fromlock, SDK pin check, extra lock roots, page import - Resx.fs: string resx -> .resources via ResourceWriter, byte-identical to msbuild's GenerateResource; Lock.Project.Resources regenerated by the runner - Project.sdkPin: global.json check, recorded in the lock, warns when not pinned - ImportOptions.Roots / Lock.*With: one token per sibling repository - import-page.fsx: page + repo-a in one lock per (framework, brand); runner sets the project directory as cwd; EmbeddedResource paths from Identity - open: page dll near-miss (hash fields only), concurrent import race, file targets with ".." (see tracker) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Conceptual review of slice 1 Verdict: the engine has not drifted; the lock record and the fromlock flag are the two blurred seams. Follow-ups listed in the tracker. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * File targets with .. in the pattern match Path.matchGroups kept the literal .. from Path.Combine while File.make normalizes it away, so a rule like ../sibling/(x:*).dll never matched. The literal prefix before the first wildcard is normalized now. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fromlock restores a toolset compiler the lock names, explains a missing SDK Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Tracker: findings on the commit sha in the lock (live worktree) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * CscLock.resolve, Lock.rehash, Lock.diff; compiler tracked, engine decides resource staleness Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Nuget module: assets graph, cache metadata, package attribution of a path Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Capture sourcelink.json; commit sha as $(SourceRevisionId), resolved from the repository The lock never stores the sha; the import depends on .git/HEAD and its ref so a commit re-imports, and the tokenized lock stays identical. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * page: 90/90 byte-identical against a clean -t:Rebuild baseline; relative .. rule Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Session notes: state after the autonomous night run so far Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sbom: deterministic CycloneDX 1.6 for an assembly from its lock and restore graph Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Verify: Authenticode PE hash and labelled byte differences between two assemblies Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * E5: shipped CoreLib 5.4.0 vs the tag built here, measured with Verify Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * E3: restore stability of the trial product repositories Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * page: sbom target; comparison with the CycloneDX page already produces Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Composed csc: resx compiled into permanent .resources through Lock.Resources, no temp files Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Placeholders for StrongName and Pack modules Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Serialize the msbuild runs of one project across concurrent imports; per-variant assets copy Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Import: force CoreCompile in the design-time build, refuse an empty command line With the previous build's assembly in obj/xake msbuild skipped CoreCompile as up to date and the lock recorded a project with no arguments. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sbom: whole restore graph as components, assets casing, forPackage; Nuget.ships Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Pack: deterministic zip and nupkg writer Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * StrongName: PE stamp, checksum and strong-name re-sign reproducing csc byte for byte Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Feature folder index Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Database: retry a transient sharing violation on open instead of recreating the file Closing and reopening the .xake database back to back occasionally threw IOException; it was treated as corruption and the rule ran again. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * E5 follow-up: pathmap and SDK do not explain the shipped/local differences; no debug directory shipped Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * E5 follow-up 2: DebugType=none; the gap is large content blocks, a different compiler build Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Session notes: end of the autonomous night run, morning queue Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Tracker: status summary, close the CscLock.resolve item Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Tracker: package graph into the lock at import, SBOM from the lock only Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Stage A1: Json and Roots out of Fsproj, project root from the engine `Fsproj` had grown a tenth of what it held: the dependency-free json reader and the root tokens every lock path is written against, used far more from `Project.fs` and the scripts than `Fsproj.evaluate` itself is (conceptual-review.md 2.5). They now live in `Json.fs` (`module internal Json`) and `Roots.fs`, both compiled before `Fsproj.fs`, which is again the F# project evaluation it is named for. And `$(ProjectRoot)` is the engine's: `ExecOptions.ProjectRoot`, what `need`, `getFiles` and rule matching already resolve against, not `Directory.GetCurrentDirectory()`. Since that is only reachable inside a recipe, the entry points that need it became recipes -- `Roots.current`/`currentWith`, `Lock.load`/`loadWith`/`save`/`saveWith`, `Fsproj.load` -- while the pure forms (`Roots.builtin`/`withExtra`, `Lock.writeWith`/`parseWith`/`readWith`, `Fsproj.writeWith`/`parseWith`) take the root, or the roots, explicitly. The cwd-based `Fsproj.roots`/`withRoots`/`write`/`parse` and `Lock.write`/`parse`/`read` are gone; every caller (Nuget, Sbom, Project, the tests, `build.fsc.fsx`, both import scripts) follows. 0 warnings both TFMs; suite 309 passed, 1 skipped; `build.fsx build` then `build.fsc.fsx build` from a re-staged `.bootstrap/` both green. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Stage A2: RunOptions, and CscLock.compile instead of a fromlock setting `CscSettingsType.FromLock` made `csc {}` a two-way branch inside one record: with a lock set, `Src`, `Ref`, `Define`, `Target`, `Out`, `TargetFramework`, `Toolset` and the rest were silently ignored, and nothing in the type said so -- `csc { fromlock p; src !!"*.cs" }` compiled and did something other than it read (conceptual-review.md 2.2). Replaying a lock is now its own entry point, `CscLock.compile project` (and `compileWith options project`), next to `CscLock.resolve` -- still `CscLock`, since F# will not let a module share the name of the `let`-bound `Csc`. What both entry points share is the runner and `RunOptions = { FailOnError; CscPath }`: how the runner behaves, not what it compiles. `run`, `ensureCompilerAvailable` and `failStep` take those instead of the settings record, and `Csc` builds them from the settings' own two fields, so the composed path is a straight line again: resolve, then run. 0 warnings both TFMs; suite 309 passed, 1 skipped (Integration included); `build.fsx build` then `build.fsc.fsx build` from a re-staged `.bootstrap/` both green; both import scripts still compile. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Design note: signing as a delegated rule (Sign module, executor contract, fake signer plan) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Verify: verdict reports total bytes and the largest range; a signed copy's appended certificate table is labelled from its own layout Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Stage B: the lock split -- Lock.Entry in three sections, structured Options, package graph, SBOM from the lock `Lock.Project` is `Lock.Entry` = { Name; Evaluation; Compilation; Dependencies } and `Lock.File` is `Lock.Document` (`Entries`). Evaluation carries the project file, the project refs, the imports, the SDK and a typed `SdkPin` (the DU moved from `Project` into `Lock`, written as its old text form) plus the property whitelist without SdkPin / NETCoreSdkVersion; Compilation the directory, the structured command line, Generated and Resources; Dependencies the compiler (with its own `Version` from the file version resource instead of the overloaded `Sdk`), the references (with `Alias`), the analyzers and the package graph. `Args` is no longer stored. `Compilation.Options` keeps every argument but the four factored sections in msbuild's order, with a marker ("@Sources", "@References", "@Analyzers", "@Defines") where each section sat; `Entry.Args` rebuilds the list and `parseImport` fails with a `Lock.diffList` when it is not exactly msbuild's -- the fidelity check. `resolve` goes through the same `ofArgs` and check (and spells `/reference:`). The restore graph is read from `project.assets.json` inside `withProjectLock` right after the design-time build and recorded as `Dependencies.Packages` (id, version, cache sha512, direct, dependsOn); the per-variant assets copy and the `ProjectAssetsFile` property hack are gone. `Sbom.forAssembly cacheRoot entry assemblyPath` reads packages, edges and direct flags from the lock; the compiler component reports `Compiler.Version`, the SDK component `Evaluation.Sdk`. `Nuget.fs` moves ahead of `Project.fs`. Found on the repo-a fixture: a single-TargetFramework project's assets keys `targets` by the full framework name (`.NETStandard,Version=v2.0`), so `Nuget.readAssets` now tries the alias and `Nuget.frameworkFullName`. `Lock.diff` covers every section (Packages included), `Lock.mapPaths` leaves markers alone, `Lock.mapText` replaces the `$(SourceRevisionId)` token across Generated, Options, Defines and properties. A flat lock is refused with "lock written by an older Xake; re-import". Tests: 318 passed, 1 skipped (ofArgs/Args round trip incl. alias, quoted comma path and a switch after the sources; the round-trip failure diff; packages from an assets fixture; diff on packages; SdkPin text round trip; flat-lock refusal; single-target assets key). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Stage B proof: repo-a 18/18 byte-identical on the split lock; scripts and fixtures updated `import.fsx` / `import-page.fsx` read `Lock.entry` / `lock.Entries`, the `show` command prints the three sections, and the page `sbom` rule reads the graph from the lock entry (no `obj/project.assets.json` read). `samples/hermetic/repo-a/`: both locks in the new format (889 lines each, the four markers in msbuild's positions, 4 packages per entry), `brand-diff.txt` regenerated, `compare.txt` records the re-run: clean import + build 9.5 s, round-trip check passed for all 6 entries, in-place `dotnet build -t:Rebuild` baseline per brand, all 18 dll/pdb/xml identical. `projects/netstandard2.0/Xake.Dotnet.json` follows the fsproj compile order (Nuget.fs before Project.fs). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Docs for Stage B: csc-syntax (Lock.Entry, section markers, round-trip check, packages), nuget-sbom, import-race, tracker, session `csc-syntax.md` rewrites "Where a Lock.Entry comes from": the three sections, the four section markers and why markers rather than a canonical order (a real lock has `/warnaserror+:` after the sources; block order differs between Roslyn versions), the round-trip check as brief §8c's fidelity guarantee, the package graph, the file format and the flat-lock refusal. `nuget-sbom.md`: the graph lives in the lock, `readAssets` is an import-time reader, the single-TargetFramework `targets` key. `import-race.md`: the assets copy stopgap is gone. `tracker.md` ticks the three "Lock stability" items and the renames; `conceptual-review.md` §4 items 6-7 done; `session.md` gets the "stage B" landing notes, the fixture bug, the proof and the test counts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * csc { lock "path" }: strict locking of composed settings Migration path A of lock-from-settings.md §9, with the semantics the user decided on 2026-09-24: strict by default, the update explicit, no engine mode and no global variable. `lock "<path>"` (CscSettingsType.Lock) leaves the settings as the source of truth -- `resolve` runs as always -- and lets the lock decide whether this is the compilation that was recorded. No lock file: rehash the resolved entry, write a one-entry Lock.Document and compile the rehashed entry. Lock present and matching: compile the *recorded* entry, so its hashes gate the build and a reference swapped after recording fails. Lock present and different: fail with the diff, naming the two ways to update. nofailonerror downgrades that to a warning and compiles the resolved entry. CscLock.record writes (overwriting) the lock without compiling -- the thing an "update-locks" phony calls; CscLock.verify returns the same diff and writes nothing. CscLock.compile stays the entry point for imported locks. The lock is not a target of the engine on this path: it is written inside the compile recipe, which is what lets a tuned csc { } block stay where it is. Path B (cscSettings {}) is not built. Lock.diff's compiler comparison now skips Sha256 when either side is empty, the rule diffHashed already followed -- otherwise a recorded lock never matches freshly resolved settings, which carry no hashes. src/tests/CscLockTests.fs: 6 integration tests (record and compile, a second build that leaves the lock byte-identical, an added source that fails with the diff, record overwriting, a tampered reference caught by the recorded hash, verify). Suite 324 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Page re-proof after the lock split: 90/90 byte-identical, 30/30 deterministic SBOMs, every entry with a package graph Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Import: ProjectReference paths from Identity and the project directory, not msbuild's cwd-resolved FullPath Found on the page fixture: 52 ProjectRefs per lock pointed at <page>/../X/X.csproj, files that do not exist. Same class as the EmbeddedResource Update fix; nothing read ProjectRefs, so builds and SBOMs were unaffected. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sign: the delegated signing rule, a fake signer, and its six tests Lands the skeleton signing.md section 5 describes: `src/dotnet/Sign.fs` (after Pack.fs, which it uses) and `src/tests/SignTests.fs`. `Sign` is the seam, not a signing tool. `Signer = Request -> Async<byte[]>` is the one thing a real deployment replaces; `Sign.executor` is a `DelegatedExecutor` that never calls the rule body -- the work happens on another agent by definition -- and owns the whole rebuilder decision: store lookup, in-flight dedup by identity, then a signer call under one unit of a dispatch `Resource` (`Resource.withAcquired`, never `withYieldedSlot`: the engine has already detached the task). Identity is `sha256(image hash | certificate | timestamp server | hash algorithm)`, where the image hash is the Authenticode hash of the INPUT for a PE and its sha256 for a nupkg. Signed bytes are never reproducible -- the RFC 3161 countersignature embeds the signing moment -- so a stored signature is a valid signature OF THAT IMAGE, not a byte-reproduction. `Sign.verifySameImage` is the check that means something. `fakeSigner` is honest about being fake only in its payload: a real 8-byte-aligned WIN_CERTIFICATE (rev 0x0200, type 0x0002) with a JSON body, data directory 4 pointed at it and `StrongName.checksum` refreshed; and, for a package, a real `.signature.p7s` entry with every other entry rewritten byte-identically through `Pack.zip`. The VerifyTests fixture that patched this by hand is now what the module produces. Tests: one per acceptance criterion -- hash invariance, one signer call for two targets sharing an image, a cross-run store hit with zero calls, the dispatch budget capping concurrency at 4 with THREADS=2, nupkg entry-level identity, and identity-key sensitivity. 331 pass, 1 known skip. signing.md gets a status line and the four places where it and the code disagreed: the builder is `Sign.sign` (FSharp.Core owns `sign`), the check is `Sign.isSigned` rather than `Verify.isSigned`, the nupkg path explodes the zip with `ZipArchive` (`Pack.entries` returns no bytes), and `Verify.compare`'s signed-vs-unsigned trap is now only the alignment gap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Notes: end-of-day state after the Sign skeleton and the ProjectRefs fix tracker.md: ticks Verify.verdict (bytes + largest range, cert-table tail labelled from the longer file's layout); adds the ProjectRefs resolved-from-Identity fix; turns "sign as delegated rule (later)" into a done skeleton item pointing at signing.md/Sign.fs/SignTests.fs, with the alignment-padding half-trap left as an open sub-item; refreshes the status summary (slice 1-2 closed, slice 3 = StrongName+Pack+Sign skeleton done, Babel waits for the user). session.md: header and state paragraphs now describe today's end state (331 passed/1 skipped, repo-a 18/18, page 90/90, 30/30 SBOMs); the queue's first three decisions are marked landed, leaving only Babel and the release; adds a "next step if nothing else is decided" paragraph (third consumer, fsc through Lock.Entry, the alignment-padding label, build.fsc.fsx migration); fixes a stale `fromlock` reference in the csc-syntax.md summary. README.md: indexes signing.md, missing from the design-notes table. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Restore: the packages a lock names, one dotnet restore, into a folder the build chooses A lock was a complete description of what a compilation reads but only a partial source for obtaining it: a compiler living in a package was restored, reference and analyzer packages were not, so a package folder without them failed the build with hundreds of `expected <sha256>, got missing` lines. Nothing here resolves a version or reads project.assets.json. A reference under the package folder is spelled <root>/<id>/<version>/..., so a missing file names its own package, and a single `dotnet restore` of a synthesized project with one PackageDownload per missing package fetches the whole set -- exact version, no dependency walk, no framework-compatibility check. Guards against duplicate work: a process-wide memo written after a restore completes, plus a Resource per package folder with a re-check inside. When nothing is missing the step costs one File.Exists per distinct path. `Restore.into ".packages"` puts the dependencies in a folder of the build's own -- what a build agent caches. The same folder expands $(NuGetPackageRoot) when the lock is read (Roots.packageRootOverride) and receives the download (RunOptions.Restore), so the two cannot disagree. Roots.withExtra accordingly lets an extra root replace a built-in token and resolves a relative root against the project root. Restore is on by default, with an explicit Enabled = false that reproduces the old failure exactly: restoring cannot change what compiles, because the lock fixes id and version, the nupkg is checked against the lock's Sha512, and the per-file SHA-256 check that follows is untouched and remains the authority. ensureCompilerAvailable is folded in -- the compiler is a package like any other. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * One lock per variant, every target framework inside it A lock file was per (framework, variant), so a multi-targeted project was imported once per framework, and each pass passed a global -p:TargetFramework=X on a -restore. NuGet then wrote a project.assets.json holding only X's target, and -restore's walk of the project graph rewrote the referenced projects' assets files too -- which a per-project lock cannot cover. Concurrent imports failed with NETSDK1005 or, worse, recorded an entry with `packages 0` and said nothing, which is an SBOM missing its package components. Lock.Entry gains Framework next to Name (identity, not evidence: a composed csc {} entry has an empty Evaluation by contract but still has a framework), Lock.Document loses it, and Lock.entryFor framework name doc is the unambiguous lookup -- Lock.entry still works while the name is unique and fails naming the frameworks when it is not. A lock written in the old shape is read and its document-level framework distributed into the entries; the new shape is always what gets written. ImportOptions.Frameworks is a list, and one import covers the whole matrix of a variant: per project, one -t:Restore with no TargetFramework (so every target lands in the assets file) and -p:RestoreRecursive=false (so the restore writes nobody else's assets file), then a design-time build per framework with no -restore at all. The race is gone by construction rather than by serializing: six cold concurrent imports, no NETSDK1005, every entry with its package graph, and the lock byte-identical between independent cold imports. Frameworks is the matrix asked for, not a claim that every project has every leg of it: the restore run -- the one phase that is not per framework -- also reports the project's own TargetFrameworks, and the import takes the intersection (Project.frameworksToImport), tracing what it skips. An import with no projects now fails instead of writing an empty lock without a word. Nuget.readAssets fails when the requested framework has no target in the assets file instead of returning an empty graph -- that silence is what produced the `packages 0` entries. Lock.load/loadWith needFiles the lock themselves, so a script no longer has to `need` it first; save deliberately does not, since a rule writing the lock as its own target would then depend on itself. Proven on repo-a (3 projects x 2 brands x netstandard2.0 + net472, 12 assemblies): 36/36 byte-identical to `dotnet build -c Release -t:Rebuild` in the same directory with the same IntermediateOutputPath, 36/36 deterministic on recompile, 12/12 SBOMs byte-identical when regenerated, and 36/36 identical again when built against a freshly restored package folder. Suite 338 passed, 1 skipped; 0 warnings on both TFMs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * A self-verification scenario for repo-a: two brands x two target frameworks the repo-a verification script imports both brands into one lock each, compiles the 12 assemblies those locks name, writes a CycloneDX per assembly, and fills a package folder of the build's own; the repo-a verification runner runs the whole thing end to end -- it makes its own fixture from a git archive copy, imports, builds, runs the msbuild baseline, compares all 90 file pairs, re-runs for determinism, exercises the package folder and times the stock restore+build scenario alongside; the repo-a verification notes is the write-up, with the measured numbers and the traps. net472 had never been imported or compiled by this branch: it is verified here, and 36/36 files (dll, pdb, xml) come out byte-identical to dotnet build. Two things the scripts had to learn: - Fail when the current directory is wrong. The project list was filtered by File.Exists, so running from anywhere but a repo-a copy produced an empty list, an empty lock in 19 ms, and a cheerful "nothing to do" from build and sbom. Now it stops and names the cwd it found and the project files it did not. - Decide what to rebuild by name, not by an empty hash. A reference this lock builds itself is recorded by msbuild as the referenced project's own bin/Release path; keying the remap on "the recorded hash is empty" makes a leftover bin/Release from an earlier msbuild run silently compile against that stale artifact, and only the projects with project references then differ from the baseline -- which reads exactly like a regression in the compiler path and is not one. import.fsx and import-page.fsx follow the new lock layout: one lock per brand, entries looked up with Lock.entryFor, no `need` before Lock.load, one getRuleMatches instead of a stack of getRuleMatch. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * SBOM package scope: the SDP RFC, summarized, with the work it implies Summary and principles of the package-scope RFC (PDR-0010 draft, comments to 2026-10-07) in nuget-sbom.md, and nine tracker items for the gap it opens. The thesis: a package SBOM built from the restore graph -- which is what Sbom.forAssembly emits, and what `dotnet CycloneDX` emits by default -- describes the supplier's build, not the package the customer receives. Transitive versions are re-resolved at the consumer's restore, the nuspec declares ranges the graph replaces with a pin, physically vendored code is invisible to the graph, and without an explicit boundary "deliberately depth-1" and "incomplete" look the same to an auditor. What that asks of us: a package-scope filter (a component enters only as a shipped file, a registry-declared subcomponent of one, or a nuspec-declared dependency), the physical inventory with hashes nested under metadata.component, the nuspec's ranges kept verbatim, nothing transitive at any depth, compositions and an annotation declaring the boundary, and the unit becoming (package, target framework). Two things worth saying from here: the lock records what the compiler was actually handed, with hashes, so merged or shared-source code is a reference we already know -- the hardest input of the verified component registry the RFC leaves undefined; and Pack.entries reads a built nupkg back, so the physical inventory is verifiable rather than asserted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Notes for the lock split by variant and for Restore csc-syntax.md: the ImportOptions table, the three msbuild phases of an import and why each is there, Entry.Framework and entryFor, the framework intersection rule, Lock.load taking its own dependency. import-race.md and nuget-sbom.md get the short notes that the framework axis of the race is closed and where the package graph now comes from. README indexes restore.md and the verification scenario. session.md records the day: both workstreams, the merge, the numbers, and the two traps that cost the most time -- a leftover bin/Release changing what the comparison measures, and the page baseline recipe failing in a tree Xake has built in, which is not fully diagnosed and is tracked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * csc through the Roslyn compiler server `run` adds `/shared` (and `/keepalive:<s>` when asked) on the csc command line, so csc.dll acts as a thin client of the VBCSCompiler next to it instead of a fresh compiler process per assembly. `RunOptions.Server: CompilerServer = Shared of keepAlive | InProcess`, default on; `noserver`/`keepalive` in the builder; `XAKE_CSC_SERVER=0` for CI. The switches are client-side: never in the rsp, never in the lock (locks stay byte-identical). The server is Roslyn's own next to the hashed csc.dll -- the default pipe name is derived from the client directory, and the request carries the compiler hash the server checks -- so no pipe name of our own is needed and `dotnet build-server shutdown` keeps working. Not served: a compiler without VBCSCompiler.dll beside it (legacy csc.exe, mcs, cscpath), one run with env vars (mono/registry toolchains), or one under the temp directory (throwaway package roots in tests left servers behind). Tests: byte-identical output with and without the server (Verify.compare, /deterministic), lock args unaffected, and a timing run. Measured: 0.21 s -> 0.07 s per one-class compile (recipe), 0.35 s -> 0.19 s for a 900-class library. Design note csc-server.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Nuget.parseNuspec: dependency groups per target framework The package-scope SBOM (tier 2) reads a package's declared dependencies from the nuspec inside the nupkg, verbatim, by TFM group. Nuget gains a Nuspec type, parseNuspec (namespace-agnostic, like readCache), nuspecFrameworkMatches (alias vs the .NETStandard2.0-style spelling) and nuspecDependenciesFor, which deliberately never falls back to the nearest compatible group. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sbom.forPackageScoped: one SBOM per (package x TFM), package scope Implements the SDP RFC's package-scope rules (nuget-sbom.md "Package scope") next to the restore-scope forAssembly/forPackage, which stay as the evidence input: - tier 1: one component per file shipped for the TFM, read back from the nupkg, SHA-256 + SHA-512, nested under metadata.component; plumbing, ref/, other TFMs excluded; our own assemblies recognised by hash - tier 2: nuspec dependencies of the TFM group, id verbatim, range in dt:nuget:declaredVersionRange, version/purl resolved from the evidence; internal ids one line, tooling ids dropped - tier 3: nothing; dependencies[] never has a tier-2 ref - compositions (complete/assemblies, incomplete/dependencies) and a boundary annotation on the root, with a deterministic timestamp - Sbom.packageSbomPath tfm = sbom/<tfm>/bom.cdx.json - Verify.sbomPackageScope: acceptance checks 3.1-3.4 as findings Component gains Properties, Bom gains Compositions and Annotations; cycloneDx renders them only when present, so restore-scope output is unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Sbom.PackageScopeOptions: the variable parts of the package-scope rule What the RFC leaves to each supplier -- which nupkg folders are content and which are plumbing, which package ids are internal or tooling, the registry hook for vendored subcomponents, the range property, root properties, the annotation text and timestamp, whether to keep formulation -- becomes an options record with the RFC's rules as defaultPackageScope, built from the named predicates in Sbom.PackageScope so overrides wrap rather than restate them. forPackageScopedWith and Verify.sbomPackageScopeWith take the record; the two default-applied functions stay. Documented with an example in nuget-sbom.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Docs for the R1-R4 run: review audit, tracker, session, Russian overview Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * verify-repo-a with the compiler server: 36/36 identical, timings Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Docs agree with the API: every hermetic-build note checked against src/dotnet The notes had drifted behind the last day's renames (Lock.Project -> Lock.Entry in three sections, Lock.File -> Lock.Document, Lock.read/write -> load/save recipes, Fsproj.roots -> Roots, fromlock -> CscLock.compile, RunOptions, csc { lock }, the compiler server). Code facts are fixed in place; history paragraphs keep the old names with a note on the rename. csc-syntax.md re-verified line by line (runner steps, JSON skeleton of the lock, lock semantics); brief.md §11 gains a dated as-built table; lock-from-settings.md recommendations carry their status; conceptual-review.md a status line per finding. New api.md: the public surface of Xake.Dotnet per module, hermetic vs pre-existing, with awkward names flagged for the API-polish plan. No code change; the four scripts compile against a re-staged .bootstrap/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Extraction plan: Xake.Hermetic as its own package, base improvements first, API polish as a separate task Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * B1: Project.fs split into CscArgs, Git, Lock, Project; extraction plan revised after the spike Plan: Csc record + module (Csc.compile replaces the Csc function, decision a), csc { ...; resolve } as the object entry, seam without hooks, CSC_SERVER variable. Spike: extension custom op + Run overload work across assemblies on F# 8; Csc.x cannot resolve while the function Csc exists. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * B2: Csc record and module, csc { resolve }, Lock.build; hermetic steps out of the runner Csc.fs holds the settings, the Csc record (the resolved compilation) and module Csc (ofSettings, run, compile); Csc.compile replaces the Csc function. The runner keeps only the hash check; restore, the revision token and the compiler-missing messages moved to Lock.compile/build, and csc { lock } is an extension defined in Lock.fs. Restore no longer names Lock. CSC_SERVER script variable. Lock JSON byte-identical (golden test, repo-a 36/36). 362 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * B3-B5: DotNetFwk.restorePackage, Hash.sha256, Tool helpers; hermetic files use public names only Toolset restore no longer goes through Restore; one file-hash implementation (Hash.sha256, throwing on a missing file; Csc.sha256 keeps the lock's "" convention); Tool.diagnosticLevel, Tool.failOnExitCode, DotNetFwk.nugetRoot/dotnetRoot public. 362 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * B7-B9: resx paths documented, one needFiles in the runner, docs and samples on the new API B7: net462 keeps ResXResourceReader (typed values, ResXFileRef), reason documented. B8: the duplicate needFiles in ofSettings is gone; Lock.record needs what it hashes; the no-targetfwk default is investigated, decision pending. B9: docs/tasks.md csc section, csc-syntax.md names, readme, samples/toolset.fsx. 362 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: state after the B-run, questions open before B10 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * B10 API polish and B8-2: names per plan §3, sign {} returns a rule, csc requires targetfwk Lock.read/format/parse, Fsproj.parse/format, Roots.make, Lock.packagesOf, Git.tokenize, Sbom.checkPackageScope, T.Default everywhere, Pack.list, CscBuilder; Verify.sha256 gone. csc without targetfwk/NETFX-TARGET fails with a message instead of the Windows-only csc.rsp fallback. Decisions of 2026-09-30 recorded in the plan. 364 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * E1-E5: Xake.Hermetic.Dotnet extracted into src/hermetic with its own tests and docs New package Xake.Hermetic.Dotnet 0.1.0 (net462; netstandard2.0), depends on Xake [3.4.0, 4.0) via a pack target; 13 modules and 11 test files moved, namespace Xake.Hermetic.Dotnet. Product docs in docs/hermetic/, base csc docs in docs/. 251 + 113 passed, 1 skipped; repo-a 36/36 byte-identical. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Base tests independent of Xake.Hermetic.Dotnet; SBOM tool entry named after the package Fsproj, toolset-import and resx-import tests moved to hermetic.tests; CscServerTests compares bytes directly; a base resx byte-identity test added. No IVT to tests. 248 + 117 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * E6-E7: build scripts pack three packages into out/pkg/<id>, CI publishes by tag prefix build.fsx/build.fsc.fsx: Xake.Hermetic.Dotnet library, HermeticVersion, nuspec range check ([3.4.0, 4.0.0)), both test projects, push-hermetic. publish.yml: v* -> Xake, hermetic-v* -> Xake.Hermetic.Dotnet. build.yml runs both suites. devprocess.md updated. build.fsc.fsx carries a repairEvaluation workaround for the Fsproj.evaluate -restore defect (to be fixed in the product). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Fsproj.evaluate: restore as a separate msbuild call, item query without -restore With -restore and two ProjectReferences msbuild reported item paths against the current directory. build.fsc.fsx drops its repairEvaluation workaround; publish.yml pins VERSION=3.4.0 for a hermetic release so the packed dll references Xake 3.4.0.0. 248 + 118 passed, 1 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * csc: the missing-target-framework error suggests targetfwk "netstandard2.0" (net8.0 is not accepted in composed mode) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 047ea581429d5d3550a8020a4cf1455b47042ad0) * Csc.run: need the command line's inputs before the hash check A reference produced by another rule of the same script was hash-checked before needFiles (re)built it, so the check saw what was on disk before (or "missing"), not what the compiler reads. Order is now: compiler, generated files, output dirs, resx needFiles + compile, needFiles of all inputs, hash check, rsp, compile. The resx step stays before the inputs' needFiles because the .resources files it writes are named by /res: and have no rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 437912a924bbc18910e2b16424a5e6270c20ff39) * Csc.ofSettings records the SDK's csc.dll, not the csc launcher beside it On macOS/Linux (and csc.exe on Windows) the SDK probe returns the apphost in Roslyn/bincore; an imported lock hashes csc.dll. Csc.managedCompiler maps a csc/csc.exe with csc.dll next to it to the dll; run already starts a .dll through dotnet. cscpath overrides are untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 659fe7a5b6f09c342df6d4599054992b30c23cad) * docs/csc-syntax.md: run needs the inputs before the hash check; composed mode records csc.dll Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit fcd31ff9db69cefc8a97ed0959fd32e1f458f0b7) * Csc.run: report every missing hashed file no rule produces before needFiles After moving needFiles ahead of the hash check, a missing reference with a recorded hash (e.g. a lock replayed with restore off) failed at the first file with "Neither rule nor file". Such files (missing, no rule per ExecCore.locateRule) are now verified before needFiles and reported together as "expected <sha>, got missing", as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 580f799d48580c937fef88f5248258d21da7ee5e) * docs/hermetic: no links into docs/features (lock, restore, README); Lock.rehash hashes with Csc.sha256 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 8bd9cb28462c0279d26ee1f3457c5b7f53a57909) * Sbom: the annotator of the package-scope annotation is Xake.Hermetic.Dotnet, the tool component's name Both now come from Sbom.toolName instead of a literal "Xake" next to the component name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 444aff5cbccd711dd0df4b56983b876ea3415ef5) * docs/hermetic: no links into docs/features (nuget-sbom, verify); annotator named in nuget-sbom.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 14314b98064ed414bf1cb34f2ad98ed21e23fafb) * docs/hermetic: no links into docs/features (pack, strongname, signing) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 36a5bd2ca4e459b59da8582601e476db36848cf1) * session: the review stack, fixes cherry-picked, procedure after merges Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * gitignore: .claude/worktrees Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * csc: the CSC_TOOLSET script variable is the toolset for blocks that name none Precedence: the block's toolset, then CSC_TOOLSET, then the SDK's compiler (an empty value counts as unset); cscpath still overrides all. Read with getVar, so it is a dependency of the targets that read it, like CSC_SERVER. (cherry picked from commit 4a2e1209c50d8d5e1ca33e92a71f9dcb626db691, without the .bootstrap dlls it carried by accident) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * DotNetFwk: the SDK probe honours global.json in the project root sdkDir took the newest directory under <dotnetRoot>/sdk regardless of a global.json. It now runs '<dotnetRoot>/dotnet --version' with the project root as the working directory and takes sdk/<printed version>; when the host fails (the pinned SDK is not installed) or prints a version with no directory there, it falls back to the newest and the compile traces a warning naming the version global.json asked for. Without a global.json the host prints the newest SDK, so nothing changes then. The probe is cached per project root (a ConcurrentDictionary of lazies, so the warning can be read without probing). locateFrameworkIn root is memoized on (root, framework); csc, fsc and msbuild pass their ProjectRoot, and locateFramework (no build context) probes from the current directory. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> (cherry picked from commit d0cae0f4e44324cd4f94b4b014651e2f220e8da2) * Xake.Hermetic.Dotnet (3/3): pack, strong name, sign Public API added: - StrongName: checksum, stamp, readSnk, sign, verify, signFile, normalise -- PE timestamp and checksum normalisation and strong-name (re-)signing without sn.exe - Sign: Settings/Request/Signer/Store, kindOf, imageHash, identity, request, isSigned, verifySameImage, fakeSigner, directoryStore, rule, executor -- Authenticode and NuGet signing as a delegated rule with a pluggable signer; sign { } builder (SignBuilder) - Docs: pack.md (the Pack module landed in 2/3), strongname.md, signing.md; README lists every piece. readme.md, src/dotnet/readme.md, docs/tasks.md and docs/csc-syntax.md point at docs/hermetic again. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/hermetic: no links into docs/features (pack, strongname, signing) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Docs: Xake.Hermetic.Dotnet architecture and user guide (draft) docs/hermetic-architecture.md is for maintainers and reviewers: the problem, the split between Xake.Dotnet and Xake.Hermetic.Dotnet, the module surface, the lock format, SBOM, verify, pack and signing, the compiler server, the evidence, the known limits and the release/versioning scheme. docs/hermetic-guide.md is a draft of the user guide: install, csc { lock }, importing projects, building from an imported lock, restore, SBOM, pack, signing, the compiler server switch and troubleshooting. Snippets not run for the guide are marked (untested). Both describe the state of this stack: the targetfwk error suggests netstandard2.0, Csc.run reports missing hashed files no rule produces, then needFiles the inputs, then checks hashes; the composed mode records the SDK's csc.dll (Csc.managedCompiler); the SBOM annotator is Sbom.toolName. Linked from docs/hermetic/README.md and readme.md. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Build three packages into out/pkg/<id>, publish Xake and Xake.Hermetic.Dotnet by tag prefix build.fsx builds three libraries (Xake, Xake.Dotnet, Xake.Hermetic.Dotnet) and runs both test projects (src/tests, then src/hermetic.tests). The two NuGet packages are versioned independently: VERSION for Xake, HERMETIC_VERSION for Xake.Hermetic.Dotnet (default: the <Version> in its project file). Every library build passes -p:BuildProjectReferences=false: the referenced libraries are already in out/ through `need`, and a global /p:Version flows into project references, so building the hermetic library would otherwise recompile Xake and Xake.Dotnet at the hermetic version and overwrite their out/ assemblies. `pack` writes each package into a folder of its own, out/pkg/<id>/<id>.<version>.nupkg, so CI can push one id without picking up the other. The hermetic package is packed after Xake's assemblies are built at Xake's version, and its nuspec is read back: the Xake dependency must be [3.4.0, 4.0.0), since that range is produced by a target relying on a private NuGet item name; pack fails otherwise. `push` and `push-hermetic` push one package each. publish.yml runs on tags v* (Xake) and hermetic-v* (Xake.Hermetic.Dotnet), picks the version variable from the prefix and pushes only the tagged package. A hermetic release pins VERSION=3.4.0, the floor of the range, so the hermetic assembly references Xake 3.4.0.0 rather than the 0.0.1 default. build.fsc.fsx compiles the same three libraries with the fsc task, from msbuild evaluations kept in projects/netstandard2.0/*.json, against a staged .bootstrap/ (gitignored). The third library is new in it. docs/devprocess.md and docs/session.md describe the release flow and how to verify. CLAUDE.md gains the feature-folder convention. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/hermetic: compiler selection (toolset, CSC_TOOLSET, SDK) and the global.json rule Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * plan/session: hermetic builds on the released Xake package; stack procedure Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * build scripts: Xake.Hermetic.Dotnet is a consumer of the published Xake build.fsx/build.fsc.fsx: the hermetic library no longer needs the Xake outputs, -p:BuildProjectReferences=false is gone, and the hermetic pack no longer builds src/dotnet or waits for the Xake nupkg; it restores from nuget.org (NUGET_SOURCE, unset by default, adds an extra restore source for developing against an unreleased base). The range assertion is reduced to "the nuspec depends on Xake and not on Xake.Dotnet"; new `pack-hermetic`. build.fsx bootstraps from Xake 3.4.0.21 (E8 for build.fsx; build.fsc.fsx keeps .bootstrap until Xake.Hermetic.Dotnet is published). publish.yml: hermetic-v* runs `pack-hermetic` and no longer pins VERSION=3.4.0. build.yml: comment. projects/netstandard2.0/ Xake.Hermetic.Dotnet.json regenerated: references the Xake 3.4.0.21 package, no project references. docs/devprocess.md, docs/session.md: the package model, the exact-lower-bound rule (NU1603), local feed only for an unreleased base, release order, bootstrap bump rule. samples/gettingstarted.fsx runs unchanged against Xake 3.4.0.21. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: hermetic architecture/guide on the published Xake dependency PackageReference on the published Xake [3.4.0.21, 4.0) with the exact published version as lower bound (NU1603 otherwise), independent packs, pack-hermetic for hermetic-v* releases, NUGET_SOURCE only for an unreleased base; the range-rewriting pack target and BuildProjectReferences=false are gone. Release order: 3.4.0 is out as 3.4.0.21, next hermetic-v0.1.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feature scripts restore the published packages; .bootstrap staging retired; repo-a 36/36 on 3.4.0.21 + 0.1.0.22 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/hermetic/workflows.md: developer, teammate, CI, release and offline flows; gaps Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs/roadmap.md: rules with arguments, B6, hermetic gaps Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: scenarios reviewed, PRs #28-#31, next B6 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fsc-design.md: B6 design note, decisions for the user Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fsc-design: decisions; roadmap: SDK restore and an F# compiler toolset Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: B6 base PRs, targetfwk optional with the SDK default Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * roadmap: hosts SDK only, targets every platform Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: 3.5 released, PR D in flight Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * workflows-ru.md: scenarios in Russian with the default-framework examples; roadmap: three small base fixes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * samples/book/intro.fsx: rules-less syntax, csc { src }, visible greet Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * roadmap: no runtimeconfig from the composed task (decided) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * roadmap: runtimeconfig only as a declared target Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * roadmap: binary compatibility between the packages, proposed minor-range rule Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: HERMETIC mode decided, stack state Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic-mode.md: the HERMETIC=on design note; workflows-ru: the mode as the key section Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: NUGET_FETCH decided, #38 merged, #37 next Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: #37 merged, queue empty, HERMETIC=on next Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic-mode: NUGET_FETCH, fsc locks exist, packageroot removal proposed, review notes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic-mode: prerequisites always written; packageroot removed (decided) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: HERMETIC mode PRs #39-#41 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: 3.6 and 0.2 released, #42 in flight Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * roadmap: in-lock project references must stay unhashed Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: hierarchical indexes (docs, hermetic, feature folder) and the next-session kickoff for the build.fsc.fsx rework Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * next-session: orchestrator on Fable, subagents for reading/experiments, interview by the orchestrator, planned restart after the brief Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * feat: Add documentation for fsc-rework implementation and review - Created `questions.md` to document questions raised by implementation subagents regarding various PRs. - Added `review.md` for an independent review of the fsc-rework against the interview and existing documentation. - Updated `index.md` to include new documentation files and their purposes. - Introduced `next-session-2.md` as a kickoff document for the implementation session of the fsc-rework. - Enhanced `session.md` to reflect the outcomes of the interview and the PR plan for the fsc-rework. - Updated `tracker.md` to include the status of the fsc-rework implementation and the PR plan. * docs: night run of the fixes plan (A1, B1, B2.1, D1, C1, C2a, G16, C0), critics, the trial project rerun, report Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: PR 0 done (dev merged, counts, night-base dry-run clean) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: PR sequence 0-4 done (tracker, next step) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic PR 2: the import records msbuild's resolved compile inputs (lock format 2) (#56) * test: fileset benchmark and edge cases for '**' excludes (dot folders, dir/** vs dir/**/*, case) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Description: options.noWarn and assemblyAttributes in the model and the schema Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: project compiles .resx resources, msbuild's manifest names, /nowarn with the SDK defaults, assembly attributes in the generated source Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Import: NoWarn, AssemblyAttribute items, metadata case-insensitive, satellite and DependentUpon resources reported Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Tests: import fidelity fixture (resx, LogicalName, attributes, NoWarn) against msbuild Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Docs: description resx/noWarn/assemblyAttributes, project covers resx, nowarn, attributes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * perf: build each mask regex once (fileset excludes like '**/.*/**/*' were ~1 ms per file) Path.matchImpl.maskToRegex constructed a RegexOptions.Compiled regex on every call; matchPart called it for each directory segment of each file an exclude mask was tried against. The regexes are now cached per mask in a ConcurrentDictionary. Same regex text and options, so the same matches. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: transitive project references in Locks.generate (G5) For each project reference B, the lock also references B's own project-reference outputs (the unhashed references of B's lock, so the closure), after the direct ones, each once, as msbuild hands csc/fsc the transitive references. Evaluation.ProjectRefs keeps the direct ones. Test: A3 -> B3 -> C compiles with A3's description naming only B3. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: Described.restoreWith brings the packages of project references (G14) A project compiled straight from its description (no lock) gets the packages its project references declare, as msbuild flows them: restoreWith descriptionOf d fwk walks the closure of projectRefs (each description at descriptionOf name, its nearest framework, declared versions, not private ones). `packages` passes every reference of the restore; Locks.generate drops its own `ref` workaround for that. nearestFramework moves to Described (Locks.nearestFramework delegates). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: framework assemblies of packages referenced on .NET Framework (G6) Nuget.readAssets returns the packages' frameworkAssemblies of the target; Described.restore keeps them as Restored.FrameworkReferences and `project` references them by name for a .NET Framework target, like the implicit ones (DocumentFormat.OpenXml on net472: WindowsBase, CS0012 otherwise). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: the compiler runs in the project's folder (G7) csc/fsc { project } set Directory to the description's project folder, so a lock records $(ProjectRoot)/<folder> and a relative <include file=...> of a doc comment resolves (CS1589 otherwise). --pathmap unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: Locks.compileAs serves an .xml rule (G12) A rule over the .xml with the dll rule's body needs the .dll beside it (whose rule writes the doc) and fails when the lock asks for no doc, so a script can need the xml first. needAll keeps needing the dlls only: a targets [dll; xml] rule would rerun forever for a lock without doc. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * dotnet: the runner compiles .resources from the resx on every run CompilerRunner compiled a .resources only when missing, so an edited resx reran the compile with the stale one. It now compiles each one again whenever it runs (the resx is an input), writing only when the bytes change (Resx.refresh). Described.refreshResources stays while the hermetic package's floor is Xake 3.7. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: the lock writer keeps backslashes in generated content Roots.tokenizeAll turned every \ into / also in Generated source text, breaking escapes in string literals of generated attributes. Generated content now only gets its roots tokenized (Roots.tokenizeText); path fields are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * perf: build each rule/mask regex once; locateRule benchmark locateRule ran Path.matchGroups for every rule and every target, and matchGroups built a new RegexOptions.Compiled Regex each time (~0.7 ms). maskToRegex now caches the regex per mask string (same change as pr/fileset-perf 2b5bf39, byte-identical so the two merge cleanly). 30 rules x 5000 locateRule calls: 94.0 s -> 0.17 s (min of 3). Script needing 3000 plain files with 5 file rules: 10.1 s -> 0.03 s. Compiled vs interpreted with the cache: 167 vs 160 ms warm, so Compiled is kept. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix: pool and database agents log their failures instead of dying silently An exception inside a MailboxProcessor loop killed the agent without a trace, and every later PostAndReply/PostAndAsyncReply waited forever at 0 % CPU (G16 hypothesis 1). Each message is now guarded: - WorkerPool: a failed Run logs "WorkerPool agent failed to schedule '<target>': <error>" at Error, releases a slot it took, and replies with a failing task, so the requesting need (and the build) fails. - Database: a failed Store logs "Database agent failed to store the result of '<targets>': <error>" at Error and keeps the result in memory; a failed lookup answers no record; close always replies. - Both subscribe agent.Error as a backstop ("<agent> stopped"). AgentFailureTests inject a throwing logger / an unpicklable result; on the old code both hang (30 s timeout), now both pass in milliseconds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix: a failed database store leaves no half record; critic nits F1: Store pickles each record into a MemoryStream and writes it to .xake in one call, so a pickling failure writes nothing and the records after it stay readable (before, a partial record was followed by later ones and could be misread silently). The agent-failure test now stores good, bad, good, reopens the database and checks both good records read back; with the old write path the second one is lost. N2: Close/CloseWait warn "Database not fully saved: N result(s) failed to store, the next build may rebuild them" when a store failed. Tests: the database test and the 3000-file benchmark work in a temp dir and delete it; the fileset cache test checks a hard-coded expected list on repeated use; benchmarks print through TestContext.Progress. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Hermetic: one restore per package set per build, Described.restoreAll in one dotnet restore, Described.closure Described.restore/restoreWith key a restore by (framework, package folder, sorted package set): the synthesized project lives at obj/xake/restore/<fwk>-<hash>/ and the resu…
…ipe); CI hang timeouts (#66) The 0.4.0 batch restore (Described.restoreAll) and the tests' `dotnet build` runs start msbuild worker nodes with node reuse. A reused node outlives `dotnet restore` / `dotnet build` and holds the stdout pipe it inherited, so whoever reads that output to the end waits for the node's idle timeout: Xake's pexec (parameterless WaitForExit after Exited) and the tests' ReadToEnd. On the ubuntu runners this stalled the test run indefinitely. - hermetic: `dotnet restore` (Described) and `dotnet msbuild` (Project.runMsbuild) run with MSBUILDDISABLENODEREUSE=1, so no node outlives them (effective with the published Xake 3.9) - core: pexec reads the output of an exited process for at most 5 s more instead of waiting for the pipes to close; test with a child left holding stdout - tests: the helpers that run `dotnet build`/`restore` with redirected output set MSBUILDDISABLENODEREUSE=1 - build.fsx `test`: --blame-hang-timeout 10m (no dump); workflows: job timeout-minutes Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…etic.Dotnet 0.4.1.32 (#67) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
) 0.4.0 added /errorlog: to every compile under the compiler server so that an analyzer crash (AD0001, S72) could be named and retried without the server. An error log makes csc report every diagnostic, hidden and suppressed ones included: +25-55 % compiler CPU per compile on a 60-file net8.0 library with the SDK analyzers (S74; +50 % server CPU on a trial project). The crash is now named from the failed compile's own printed errors (AD0001 lines collected from the target's logger), then retried once without the server as before. Regression test: the compile under the server gets no /errorlog:. Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…etic.Dotnet 0.4.2.34 (#69) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…hrottle the compiler launch (#70) * resources: need of a rule target inside withResource/requiring fails fast A recipe that needs a rule target while it holds units of a bounded resource can deadlock the build (hold-and-wait through the resource queue, zero CPU, no error). ExecContext gets HeldResources; withResource and requiring set it for their body, a new task starts with it empty, and execNeed refuses a target that has a rule while it is not empty, naming the resource(s), the needing and the needed target. Plain files without a rule stay allowed. allowNeed lifts the guard. * compilers: CSC_JOBS/FSC_JOBS cap concurrent compiler launches CompilerRunner (behind Csc.run and Fsc.run) takes a process-wide per-tool resource around the compiler launch only, after every needFiles and the hash check, so the budget is never held across a need. Limit: the script variable CSC_JOBS/FSC_JOBS, then XAKE_CSC_JOBS/XAKE_FSC_JOBS; unset or 0 is unlimited. Read from the context variables directly, so it is not a dependency: changing it rebuilds nothing. * docs: resources and need (design record), CSC_JOBS/FSC_JOBS, 3.10 release notes The design note becomes docs/resources.md with the owner's decisions; delegated.md states the no-need-under-a-resource rule, allowNeed and requiring; csc-server.md, tasks.md, cheatsheet.md and hermetic-guide.md document CSC_JOBS/FSC_JOBS. * compilers: Throttle -- a script's own resource in place of CSC_JOBS/FSC_JOBS `Throttle: (Resource * int) option` in RunOptions, FscRunOptions, CscSettingsType and FscSettingsType, and `throttle (resource, units)` in csc { } / fsc { }. When set, the runner acquires that resource around the launch (after every needFiles) instead of the jobs budget, which is then not read; None keeps CSC_JOBS/FSC_JOBS as they were. Data, not a hook on Csc.run. * docs: throttle (resource, units) next to CSC_JOBS/FSC_JOBS, design record
…ock.Options in one record (#71) * hermetic: Locks.compile settings lockPath fwk -- roots, versions and Lock.Options in one record compileAsWith/compileAs are thin wrappers over it, behaviour unchanged. The script's Lock.Options reach Lock.compileFromWith; Run.Server left at the default is still resolved from CSC_SERVER, an explicit one is used as is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * docs: Locks.Settings and Locks.compile, the Throttle note, 3.10 release notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Xake.Hermetic.Dotnet 0.5.0 on Xake [3.10.0.35, 3.11): core 3.10 (HeldResources, Throttle), release notes Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * self-build: hermetic description and lock re-imported on Xake 3.10.0.35 (LOCK_REFRESH=Xake), fingerprints Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…nly (the hermetic lock has no project reference; its place is the scheduler's, failed on the Linux runner) (#73) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…metic.Dotnet 0.5.0.36 (#74) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
* progress: running tasks as coloured Braille dots (4 cells, ~30 tasks, + above; text when redirected) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * release notes: the progress dots go to 3.10.1; 3.10.0 is released as 3.10.0.35 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ts (#76) * build scripts: `test` as 7 parallel jobs over slices of the test projects (testjobs.fsx, shared by build.fsx and build.fsc.fsx) The test projects are built once (`test-build::<project>`), each `test::<project>/<slice>` runs `dotnet test --no-build` on whole fixture classes (NUnit.Where; the last slice of a project takes the rest) into out/test/<project>/<slice>/ (trx, console.log, blame files), one summary line per job on the console. `test`: about 55 s instead of 3 min 40 s. FILTER narrows every job (`name =~`), and `-d FILTER=` now reaches the variable. The hermetic description fixture gets its own ~testout~ folder (it shared "description" with src/tests' one). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * build scripts: the compiler server's test users in serial `server` jobs, every other job with XAKE_CSC_SERVER=off The server (VBCSCompiler) is one per machine: a neighbour job starting it, loading it or letting its keepalive expire made a client fall back to a plain csc, which failed `Compile under the compiler server` (no AD0001 retry). tests/server (Csc compiler server) runs, then hermetic/server (Building from Xake-generated locks, Compile under the compiler server); the other six jobs compile in-process. hermetic/build is folded into hermetic/lock. 8 jobs, 397 + 289 tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic.tests: the analyzer-crash-under-the-server test stops any running compiler server first; the Settings.Lock test stops the keepalive-5 server it may start A server left running (an earlier run's, with the previous analyzer.dll of the same path loaded, or one dying on its keepalive) rejected the compile and the client fell back to a csc process silently, where the analyzer does not crash: no AD0001 retry, the test failed now and then. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…test .dll.config) (#78) * hermetic: design note for recording msbuild's binding redirects at import (S55) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: tracker and session for cycle 3 (four-cell timing explained, S55 next) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * tracker: rm { dir; dir } keeps only the last dir (trap) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic: record msbuild's binding redirects at import (.exe.config, test .dll.config) The app run (referenced projects as stand-ins) now covers every project msbuild generates binding redirects for, the scratch <TargetFileName>.config is deleted before it, and appOf records the finished file, else the config before redirects, else the project's own App.config; a .NET Framework test library gets its .dll.config. A recorded config naming the stand-in version fails the import. Xake.Hermetic.Dotnet 0.5.1; lock format unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic tests: binding redirects recorded at import (net472 app with binary resources, net472 test library, net8.0-windows app, stand-in guard) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * hermetic docs: binding redirects in lock.md, 0.5.1 release note, S55 implemented Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…0.402 (#79) * self-build: description fingerprint after hermetic 0.5.1, locks on SDK 10.0.402 (10.0.401 is gone), CI build-fsc on 10.0.402 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * build.yml: the comment names SDK 10.0.402 too Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * session: the self-build fingerprint trap after a hermetic fsproj change Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…brand imports no longer race on obj/) (#81) * hermetic: restore each import into obj/xake-record/<key>/ (MSBuildProjectExtensionsPath) Import.record keyed its design-time builds' IntermediateOutputPath per import, but msbuild's restore output (project.assets.json, nuget.g.props/.targets, project.nuget.cache) went to the project's shared obj/. Two imports of one project tree with different properties in one run (two brands) interleaved, and a brand's lock could hold the other brand's packages. A props file handed to every msbuild run of the import (CustomAfterDirectoryBuildProps, with the key as XakeRecordKey) now sets MSBuildProjectExtensionsPath to <base>/xake-record/<key>/; it chains the script's own CustomAfterDirectoryBuildProps and the SDK's UseArtifactsOutputPath.props, which the global property hides. The concurrent-brands tests now run the imports through one need (the command line ran them one after the other), and a new one checks each brand's packages over three rounds. Xake.Hermetic.Dotnet 0.5.2; self-build fingerprint after the version bump (descriptions and locks unchanged). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * tracker: stale obj/xake-record/<key>/ folders after #81 (owner's clean remark) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * tracker: stale xake-record folders — decided: no import-side cleanup, clean obj/ wholesale Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…pack: fetched as packages, prerequisite only when sdk/ is named) (#80) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Each custom op used to overwrite its field, so `rm { dir "a"; dir "b" }`
deleted only "b", and mixing kinds ran only the first non-empty one.
RmArgs now holds an ordered RmTarget list (Dir | File | Files); the ops
append. Existence is re-checked right before each delete and resolved
paths are deduped across targets.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Same rework as rm: CpArgs holds an ordered CpSource list (Dir | File | Files) and the ops append. The relative-path rule is computed per source (file always flattened, dir relative to the project root, files relative to the fileset basedir); needFiles runs once over all sources, then files copy in declaration order. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Problem
rm { }andcp { }stored onedir, onefileand onefilesfield. Repeating an op overwrote the previous value (rm { dir "a"; dir "b" }deleted onlyb), and the recipe ran only the first non-empty kind (rm { dir "out"; file "*.tmp" }ignored the dir; same forcp).New shape
dir,file,filesappend; targets/sources apply in declaration order with the same per-kind semantics as before.rm: existence is re-checked right before each delete (an earlierdirmay already have removed a path); resolved paths are deduped across targets.cp: the relative-path rule is per source (filealways flattened,dirrelative to the project root,filesrelative to the fileset basedir;flattenflattens all).needFilesruns once over all sources, then files copy in order; a duplicate target path follows the existingoverwriterule.Script syntax (
rm {file "x"},rm {dir "x"},cp {dir "bin"; todir "deploy"},files ...,verbose,del) is unchanged. Code that builtRmArgs/CpArgsrecords directly must switch totargets/sources.Tests
With
ThrowOnError = true:src/tests/FileTasksRm.fs: twodirops both delete;dir+file+filesin onermall apply;filemask and fileset inside a dir removed earlier in the samermdo not fail.src/tests/FileTasksCopy.fs: twodirsources both copied with their relative paths;dir+file+filesin onecpall land intodir, thefileone flattened. Existing copy tests moved tosources = [...].--filter "FullyQualifiedName~Rm": 7 passed, 0 failed.--filter "FullyQualifiedName~Copy": 7 passed, 0 failed.Docs:
docs/tasks.md(Copy and Remove examples),docs/release-notes.md(3.10.1 unreleased).🤖 Generated with Claude Code