Skip to content

Source-map cosmetic/consistency nits (TS-1, TS-2, CON-2, CON-4, CX-6, PY-2) #188

Description

@dean0x

Follow-up cosmetic / consistency nits surfaced during the PR #183 source-map review. No defects — type-safety polish, doc niceties, and test-style consistency deferred out of the merge-ready branch.

Items

  • TS-1packages/mds/src/util/options.ts:27 — redundant as CompileOptions casts; remove now-unneeded assertions. Type-safety polish.
    → LANDED in PR v0.4.0 Wave 1: breaking changes, live-bug fixes, and release-safety gates #308 (339df37). grep -rn "as CompileOptions" packages/mds/src/ → zero hits. Cast-free replacement is forwardOpts at packages/mds/src/util/options.ts:296-317, with METHOD_KEYS.compile now keysOf<CompileOptions>(...) instead of keysOf<_CompileBackendOpts>.
  • TS-2packages/mds/src/backend/native.ts:87 — redundant downcasts on the compileOpt() return. Cosmetic.
    → LANDED in PR v0.4.0 Wave 1: breaking changes, live-bug fixes, and release-safety gates #308 (339df37). Old form at 113f472:packages/mds/src/backend/native.ts:88 was compileOpt(options) as NapiCompileOpts | undefined (twin at :100). Current native.ts:83 is addon.compile(source, forwardOpts(options, 'compile')). grep -n "as Napi" native.ts and grep -rn "compileOpt(" packages/mds/src/ → zero hits. Note compileOpts (plural) at packages/mds/src/backend/wasm.ts:353 is a separate local WASM helper, not this.
  • CON-2 — (test files) — divergent test-ID schemes across suites (F-SM / SM-PY / U-SM). Cosmetic; arguably intentional per-backend namespacing — reconcile or document the convention. (Updated refs: crates/mds-napi/__test__/index.spec.mjs:1211 (F-SM*), crates/mds-python/tests/test_source_map.py:4-13 (SM-PY-*), packages/mds/__test__/source-map.spec.mjs:5-12 (U-SM*), plus a fourth scheme sm1_..sm20b in crates/mds-cli/tests/cli_source_map.rs.)
  • CON-4crates/mds-wasm/src/lib.rs:191-193 (struct), :394-398 and :740-742 (round-trip), :441-442 (unpack) — WASM CompileOptions uses a two-bool round-trip; align the API shape with the other bindings. Cosmetic API-shape consistency.
  • CX-6crates/mds-core/src/sourcemap.rs — the S3/S6/S7/S8/S9 provenance legend is absent; add the provenance-tag legend as a doc comment. Doc nicety, no defect. Note (reference check, 6d41777): the tag S9 has zero occurrences in crates/mds-core/src/. S3/S6/S7/S8 appear as inline comments at sourcemap.rs:28, 594, 597, 604, 655, 690, 841, 846. The legend is genuinely absent, but the tag vocabulary this issue asks for is partly stale — flagged, not resolved.
  • PY-2crates/mds-python/tests/test_source_map.py:27 — module-scope FIXTURES instead of pytest fixture injection. Test style.

Deferred from code review of PR #183 (#62); see resolution-summary 2026-07-16_1241.


References verified against main at 6d41777 (2026-08-26). Line numbers corrected; scope and acceptance criteria unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ecosystemBindings, packages, and integrationstech-debtTechnical debt

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions