Repository navigation
feat!: add typed error catalog and structured SDK facade - #76
Closed
google-labs-stitch[bot] wants to merge 4 commits into
Closed
google-labs-stitch[bot] wants to merge 4 commits into
google-labs-stitch[bot] wants to merge 4 commits into
Conversation
- Add ConfigField with compile-time snake_case and camelCase paths - Record rejected values, bounds and voice indices in ConfigProblem - Add MidiProblem and BufferName enums to Error and EventProblem - Record frame offsets and bounds on timed event preflight errors - Export Tsify ErrorDetails and map BlockEvents to TimedEvent[] - Emit clean TSDoc comments in generated TypeScript declarations - Add TuneletError and an encapsulated Tunelet facade in src/index.ts - Guard pre-init calls, disposal and mismatched Wasm sources
- Keep the clamp_i32 and ConfigField imports in src/formant.rs. - Update the harmony_gain rustdoc in src/resynthesis.rs for Wasm.
- Keep the BufferName checks with process_into in src/processor.rs. - Call Processor::check_block with domain_error in src/wasm.rs. - Initialize validated Wasm modules asynchronously in src/index.ts.
- Keep the drainMono doc comment from main in src/wasm.rs.
Contributor
|
Closing this PR. At +3,094 lines across 18 files, this is overly invasive and breaks both Rust and TypeScript APIs. In particular, hardcoding 22 internal wasm-bindgen export symbol names in REQUIRED_WASM_EXPORTS is brittle across wasm-bindgen upgrades. |
byteland-app
deleted the
stitch/typed-error-catalog-sdk-facade-jm1-1c53d19d-48f5-4629-a9c7-1d4f1252d558
branch
November 25, 2026 08:05
Contributor
Author
|
Understood — leaving #76 closed with no further changes pushed to this branch, avoiding the breaking Rust/TypeScript error-catalog changes and the hardcoded |
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.
Summary
This pull request adds a typed error catalog in Rust, exports structured
ErrorDetailsdiagnostics from WebAssembly, and replaces wildcard re-exports insrc/index.tswithTuneletErrorand an encapsulatedTuneletfacade.Rust error catalog
ConfigField(Copy,#[non_exhaustive]) withconst fn as_str(snake_case) andconst fn camel_case(camelCase) for all 34 validated controls.ConfigProblem::OutOfRangeandConfigProblem::NotFinite, integer bounds inConfigProblem::IntegerOutOfRange(including1..=usize::MAXforPrepareConfig::new), and both frequency bounds inConfigProblem::Unordered.voice: Option<usize>(0..=3) onError::InvalidConfigandEventProblem::Configfor four-slot harmony interval arrays (chromatic_intervalsanddiatonic_intervals).MidiProblem(Copy,#[non_exhaustive]) with the rejectedu8byte or field value acrossMidiEvent::from_bytes,MidiEvent::validateand block event preflight.BufferName(Output,Left,Right) toError::BufferLengthacrossProcessorandsrc/wasm.rs.offsetonError::InvalidEvent,offsetandframesonEventProblem::OffsetOutsideBlock, andoffsetandpreviousonEventProblem::OffsetDecreasing.WebAssembly and TypeScript SDK
TsifyErrorDetails,ConfigProblemKind,EventProblemKind,MidiProblemKindandInputTargettypes fromsrc/wasm.rswithcamelCasepaths and rejected constructor inputs.BlockEventstoTimedEvent[]and strip Rust module paths from deserialization errors sotunelet::wasm::BlockEventsandtunelet::config::ProcessorConfigdo not appear in declarations or error messages.pkg/tunelet.d.tsanddist/index.d.tswithout raw rustdoc intra-doc link markers.TuneletErrorand an encapsulated#innerTuneletclass fromsrc/index.tsthat guards pre-initialization calls, treats repeatedfree()and[Symbol.dispose]()calls as safe no-ops, rejects post-disposal calls, and rejects mismatched custom Wasm sources inloadTunelet(source)andinitSync(module).Verification
cargo fmt --checkcargo build --locked --releasecargo clippy --locked --lib -- -D warningscargo clippy --locked --lib --target wasm32-unknown-unknown --features wasm -- -D warningsRUSTDOCFLAGS="-D warnings" cargo doc --locked --no-depsnpm run buildHEADand zero heap allocations afterProcessor::newacross audio, control, feedback, drain, reset and error paths.TuneletErrormessages,detailspayloads, clean.d.tsdeclarations and SDK lifecycle transitions in Node.js.Automated PR initiated by user @byteland-app via Stitch Loop.