Reported by the OmniSim evaluation of the public u-link example
(2026-09-11): pip install + export.py on Windows died three times in
the build layer before any geometry was built.
- Binary-mode opens: every byte-exact os.open site now sets O_BINARY
via _internal/os_compat.with_binary_flag. autocrlf=true clones read
builder sources in text mode, stripped CR, and aborted with a false
file_input_changed (25579-byte u_link.py read back as 25092); the
same hazard expanded LF on cache writes and would corrupt CAS
hashes. Sites: build/dependencies.py, artifacts/feature_graph.py,
scene/archive.py, cache/store.py (object/record writes, lock
create), artifacts/interface.py (lock create).
- Directory fsync is POSIX-only: os.open(<dir>)+fsync raised
PermissionError on Windows in cache/store.py and
artifacts/interface.py; both now no-op off POSIX via one helper.
- Stale-lock recovery by evidence: a lock whose recorded owner pid is
provably dead is recovered immediately (unreadable owners still wait
out the age gate, live owners are never broken). Windows liveness
probing uses OpenProcess/GetExitCodeProcess — os.kill(pid, 0) maps
to TerminateProcess there and kills the process being probed.
- Console hardening at import: non-UTF strict streams are reconfigured
to backslashreplace so a cp1252 console cannot raise
UnicodeEncodeError from a diagnostic print inside an error handler
and mask the real failure.
- .gitattributes: byte-exact by default, LF pinned for text formats,
so builder-source digests stop depending on core.autocrlf.
Tests: test_os_compat.py (15) + dead-owner immediate recovery in
test_cache_store.py; full suite 1799 passed, 5 skipped. ty: zero new
diagnostics.
- @scad.part/@scad.assemble anchor defaults to the builder script's own
directory: cache + interface state land beside the source, standalone
scripts run anywhere, and the pyproject.toml walk-up requirement is
gone (explicit project_root still relocates the anchor)
- file_input() paths resolve relative to the anchor; in-repo examples
rewritten to script-relative declarations
- HistCAD translator emits keyword-form sketch-family calls (corpus
self-documentation), pinned by tests; booleans stay positional by
*solids signature
- both translators emit project_root=Path(__file__).parent explicitly;
examples/histcad_demo regenerated (STEP volume reconciliation held)
- FTC convention documents @scad.part parameters and the cache contract
- version stamps 2.1.2 + bilingual update notes
Tooling patch: SDK API unchanged. Adds the CadQuery→FTC translator toolset
with snapshot constraint recovery (merged in #49) and its bilingual update
notes; version stamps updated in pyproject+lock, SKILL frontmatter, and
both READMEs.
* feat(skill): replace skill-pack with per-harness conditional compiler
skillbuild compiles the skill tree into per-target harness builds:
- <!-- skill:if omp,!claude --> blocks include text only for matching
targets; name-list conditions only, no else/nesting, fail-loud on
unknown targets and unpaired/nested directives
- fence-aware: directive-looking lines inside code fences are literal
- layout is the filesystem; tree root configured in skillproj.toml
- post-build assertion: zero directive residue, SKILL.md frontmatter
name check
Migration to the new model:
- docs/skill/ becomes the self-contained source root (SKILL.md,
references/, generated api/stdlib/core/guides now under
references/docs/; SDK_OVERVIEW/LICENSE/inspect are ordinary tree
files)
- auto_docs_gen output redirected into the tree (docs/api ->
docs/skill/references/docs/api, likewise stdlib)
- skills/simplecadapi/ is now the compiled omp target output;
dist/generic/simplecadapi the generic target
- dropped skill-pack entry point (plus dangling evolve/make-export
entries and their orphaned test), release workflow builds via
skillbuild + tar; README updated
First real conditional block: harness reading paths in SKILL.md
(skill:// mount on omp vs disk-relative on generic).
Verified: 59 tests pass (skillbuild 31, auto_docs_gen 19, persistence
regression 9); both targets build; outputs residue-clean; full suite
collects (1376 tests).
* refactor(tools): auto_docs_gen moves out of the installed package
tools/ scripts are repo-checkout dev scripts, not packaged CLIs:
- auto_docs_gen.py now lives in tools/ beside the other generators;
auto_tools/ package removed entirely
- path resolution simplifies: repo root = parent of tools/, fail-loud
if pyproject.toml missing; site-packages/cwd fallback branches were
dead code once the script stopped shipping in the wheel
- auto-docs-gen console script dropped from [project.scripts];
release.yml and README invoke python tools/auto_docs_gen.py
- MANIFEST.in stale src/auto_tools include removed; CadQuery-free
runtime scan no longer needs the auto_tools filter
- run_examples.py retired (user removal): README example-runner text
updated to direct examples/ scripts; dangling runner-contract test
(runpy.run_path into the deleted script) removed
Verified: 53 tests pass (auto_docs_gen + skill_build + ocp runtime
scan) and test_example_model_contract passes; regeneration from
tools/ is byte-identical (zero docs drift).
* refactor(skill): strip harness and build-tool content from the skill tree
The skill is plain harness-neutral content again:
- SKILL.md 'Reading skill files' section removed (the omp skill://
mount block and its !omp complement were the only conditional
blocks; the tree compiles identically for every target now)
- references/README.md: build-tool meta removed ('per-harness
conditional compilation', skillbuild packaging/validation claims —
link validation was never implemented, so the claim was false)
- live test now asserts the tree stays harness-neutral (zero blocks)
- skillproj.toml targets aligned with the user's output table
(omp -> skills/simplecadapi-omp, opencode -> skills/simplecadapi-opencode;
leftover 'generic' entry had no output and failed the build)
- compiled outputs are regenerable artifacts: skills/simplecadapi/
untracked from git, skills/simplecadapi-*/ gitignored, release.yml
and README build via skillbuild and tar the omp output directly
(bsdtar has no --transform; inner dir keeps its suffixed name)
Verified: 49 tests pass; both targets build 372 files with zero
conditional blocks; no omp/conditional/directive residue in the tree
or outputs.
* chore(docs): drop stale architecture review and design notes