Skip to content

test(generator): add text/binary classification fixtures (SW-034) - #286

Merged
dDevAhmed merged 1 commit into
DigiNodes:mainfrom
soladayo21963-coder:feat/sw-034-text-binary-classification-fixtures
Oct 21, 2026
Merged

dDevAhmed merged 1 commit into
DigiNodes:mainfrom
soladayo21963-coder:feat/sw-034-text-binary-classification-fixtures

Conversation

@soladayo21963-coder

Copy link
Copy Markdown
Contributor

Prove that template generation correctly distinguishes substitutable text content from binary content:

  • text files (no NUL bytes) receive only the allowlisted {{projectName}} and {{templateId}} substitutions, including multi-occurrence, nested subdirectory, empty, whitespace-only, and brace-only cases
  • binary files (containing at least one NUL byte) are copied byte-for-byte with no token expansion, regardless of file extension; verified with leading/trailing/mid-buffer NUL positions, all-byte sweep (0x00..0xFF), token strings embedded inside binary payloads, and zero-length files
  • classification is purely byte-level and deterministic: same buffer always produces the same outcome across independent template trees and repeated calls; boundary test confirms a single NUL flips text → binary
  • mixed templates process text and binary siblings at every nesting depth without cross-contamination

Closes #136

Summary

Related Issue

Closes #

Scope

Testing

  • Tests added/updated where applicable
  • Existing relevant tests pass
  • Lint/type/build checks pass where available

Security Impact

  • No security-sensitive behavior is changed
  • Security-sensitive behavior is changed and explained below

Security notes:

Release Impact

  • No published/user-visible behavior change

  • Patch

  • Minor

  • Breaking/pre-1.0 contract change

  • Changeset included where required

  • Changeset not required; reason explained below

Release notes:

Documentation

  • Documentation updated where applicable
  • No documentation change required

Checklist

  • I read docs/contributing/wave-architecture.md for Stellar Wave work
  • I stayed within the agreed issue scope
  • I checked for overlapping open contributor PRs
  • I did not include secrets or sensitive data
  • I reviewed new/updated dependencies if any
  • I considered failure/error paths, not only the happy path
  • I am not disclosing an unresolved vulnerability publicly

Prove that template generation correctly distinguishes substitutable text
content from binary content:

- text files (no NUL bytes) receive only the allowlisted {{projectName}}
  and {{templateId}} substitutions, including multi-occurrence, nested
  subdirectory, empty, whitespace-only, and brace-only cases
- binary files (containing at least one NUL byte) are copied byte-for-byte
  with no token expansion, regardless of file extension; verified with
  leading/trailing/mid-buffer NUL positions, all-byte sweep (0x00..0xFF),
  token strings embedded inside binary payloads, and zero-length files
- classification is purely byte-level and deterministic: same buffer always
  produces the same outcome across independent template trees and repeated
  calls; boundary test confirms a single NUL flips text → binary
- mixed templates process text and binary siblings at every nesting depth
  without cross-contamination

Closes DigiNodes#136
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 553add1c-6ca1-4ab6-8474-bbd1b318ee70
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dDevAhmed
dDevAhmed merged commit 3c518be into DigiNodes:main Oct 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SW-034 — Add generator text/binary classification fixtures

2 participants