Skip to content

feat(cli): add sample-sheet validation and correction review - #14

Merged
omniscoder merged 2 commits into
mainfrom
feat/sample-sheet-review
Oct 10, 2026
Merged

omniscoder merged 2 commits into
mainfrom
feat/sample-sheet-review

Conversation

@omniscoder

@omniscoder omniscoder commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

Sample-sheet cleanup changes IDs, indexes, lanes, metadata whitespace, and file formatting. Users can now inspect those changes before creating a run or exporting files.

validate-sample-sheet checks whether the built-in cleanup profile accepts the input and reports whether cleanup would change it. preview-sample-sheet shows original/proposed headers, cell changes, warnings, and a review hash; --json includes the complete proposed file. Both commands are read-only and make no remote requests. Invalid input reports the first blocking error rather than partial output.

tidy --accept-preview <sha256> recomputes the review and rejects changed input, validated profile rules, or proposed output before creating a run. The accepted run stores the matching input bytes, avoiding a second read of the source after approval. Direct tidy remains available for existing callers. Review hashes establish a content match, not authenticated human approval.

Preview shares the existing parser and cleanup implementation. JSON schemas, exit statuses, formatting-only changes, row numbering, profile scope, and acceptance behavior are documented. The previously published v0.0.2 release is not changed.

Validation counts cell changes without retaining detail objects. Preview retains up to 1,000 cell changes and explicitly reports truncation plus the total count; JSON retains the complete proposed file. Acceptance covers the complete cleanup. The review finding about materialized changes is addressed and resolved.

Validation:

  • Added 22 tests covering exact corrections, no-change files, formatting-only/BOM/TSV changes, quoted multiline metadata, hash determinism and profile binding, malformed/oversized/invalid-UTF-8 input, no writes during review, exact accepted output, stale review rejection, syntax errors, explicit truncation, and bounded large-file processing.
  • Final hosted CI: 172 core tests passed; all seven checks passed (Nix, Conventional Commits, Linux Node 20/22/24, and Windows Node 22/24).
  • Regression fixture validates an 8 MB input with 2,039,999 cell changes under a 512 MB Node heap, retaining just 1,000 detail objects for preview.
  • Installed npm package exercises validation -> preview -> accepted cleanup -> verify -> report and invalid input handling.
  • Nix installed-command smoke test exercises the same review/accept flow and compares exported bytes to the preview.
  • Golden fixture verification, installed-package checks, and workflow demo smoke checks passed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T18:33:31.379328Z eb7c569 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: eb7c569e38

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/clean/sample-sheet.ts Resolved
@omniscoder
omniscoder merged commit 90c4ccc into main Oct 10, 2026
7 checks 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.

1 participant