Skip to content

fix(templates): bind native authorization to fixed-template bytes - #53

Merged
egdev6 merged 3 commits into
mainfrom
fix/b01-fixed-template-byte-binding
Oct 10, 2026
Merged

egdev6 merged 3 commits into
mainfrom
fix/b01-fixed-template-byte-binding

Conversation

@egdev6

@egdev6 egdev6 commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Bind native fixed-template authorization to raw source bytes, rendered UTF-8 bytes and raw destination bytes (null when missing), without content in observations.
  • Check before the first mutation and before the template batch; write the exact validated capture while preserving ensure skips, replace-always-write behavior, target order and platform report paths.
  • No lifecycle/sync/protection activation, configuration flags, API Expose a read-only repository planning API with an injected command backend #49, version bump or release.

PR type

  • Bug fix — type:bug
  • New feature
  • Documentation only
  • Code refactoring
  • Maintenance/tooling
  • Breaking change

Changes

File Change
skills/github-repository-bootstrap/scripts/bootstrap.mjs Conditional observations and early/late native byte checks
skills/github-repository-bootstrap/scripts/fixed-template-state.mjs Raw/rendered/destination captures and hash-only metadata
skills/github-repository-bootstrap/tests/fixed-template-renderer.test.mjs Keep all six existing assertion bodies; add nine byte-binding and causal drift cases
skills/github-repository-bootstrap/tests/helpers/native-cli-fixtures.mjs Keep string replies; support trusted offline replies that modify owned copied assets
docs/odd/b01-fixed-template-state.md Contract, non-neutral tightening and race/rollback limitations

Review scope: 5 paths, 372 additions / 24 deletions = 396 combined lines.

Validation

  • Focused checks passed: 15/15 in LF and physical CRLF.
  • Documentation and configuration updated when needed (docs changed; configuration schema unchanged).

Meaningful native CLI RED with bootstrap unwired: 15 tests, 8 passed / 7 behavior failures; all six delivered tests passed. Initial wired 14/15 exposed an incorrect expected skipped-label record in the late partial-report test. The complete expected record was corrected without removing assertions; focused GREEN is 15/15.

Local Node 24/Linux checks:

  • Full suite: 201/201 passed in each LF and physical CRLF variant, zero failures/skips/cancellations.
  • Same-rendered invalid UTF-8 source drift and destination byte drift: all four assets in ensure/replace, early rejection and fresh approval.
  • Causal early/late interleaving through an offline gh fixture; late rejection preserves earlier completed and skipped work.
  • Template-absent authorization matches the legacy canonical observation shape; non-regular, missing and symlink cases checked.
  • Gitleaks 8.30.1: both directory variants and all 39 locally available commits clean; four scanner fixtures pass in each variant.
  • Actionlint 1.7.12: both workflow inventories and four fixtures pass in each variant.
  • One npm pack: exactly 72 unique regular files, no symlinks; Source/freeze/archive bytes identical; version remains 1.1.0.
  • Independent verification reproduced 396 lines, 72 hashes and its own 15-pass run; native risk/resilience/readability/reliability review approved and acknowledged.

LSP limitation: one primary active batch returned 0 diagnostics, 0 confirmed-clean files and 4 inconclusive checks. The human explicitly accepted this limitation for this candidate; it is not successful semantic type checking. Native assessment was unassessable due untracked declaration, so high-risk self-verification plus a separate independent verifier were performed; native approval did not replace functional checks.

Hosted Node 20/Windows/macOS results are pending CI, not inferred from Linux. The new source-file symlink test explicitly skips Windows; the two inherited descriptor/procfs skips remain separate. Metadata capture now reads assets even in ensure mode and rejects non-regular sources/destinations: not a behavior-neutral refactor. Batch capture does not eliminate later races, aliases, source-read races or provide global rollback. The trusted offline fixture is not a sandbox.

Contributor checklist

  • Approved linked issue, nonclosing reference.
  • Exactly one PR type selected: Bug fix (type:bug).
  • Applicable focused/full checks run and behavior documentation included.
  • Conventional commit, no Co-Authored-By trailers.
  • Shellcheck and changed-skill loading: not applicable; no shell script or skill instruction files changed.
  • Technical probes, failed-run evidence and verification snapshots retained outside the 72-file product/archive selection.

Linked issue

Refs #15

This unit does not complete or close #15. Remaining runtime modules, offline #15/live #17 acceptance, protection/migration and independent API candidate #49 remain separate. No merge, auto-merge, release, Root synchronization or cleanup requested.

@egdev6 egdev6 added the type:bug Bug fix or regression label Oct 10, 2026
Resolve the fixture-owned temporary directory before constructing copied CLI paths so the native entry guard executes under aliased TMPDIR.

Refs #15
Read the independent expected filesystem root through git rev-parse before hashing the unchanged template-absent observation.

Refs #15
@egdev6
egdev6 merged commit b743013 into main Oct 10, 2026
6 checks passed
@egdev6
egdev6 deleted the fix/b01-fixed-template-byte-binding branch October 10, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:bug Bug fix or regression

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verify package completeness, migration, and release readiness

1 participant