Repository navigation
Original wording: review follow-ups (enumerators, upgrade test, pruning) - #96
Merged
Merged
Conversation
The helper wrote the restored protocol.json with write_text, which on Windows turns \n into \r\n, while it recorded the sha256 of the \n text. The cached copy then never matched its record: every check restored again, and the app's run would refuse the copy. Write the exact bytes that are hashed (status.json too), and test that the cached file's sha256 is its recorded one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h the platform separator Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t names), in the test and the pin lookup Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dex pruning - Enumerators removed in both the app and the helper (same patterns): Roman numerals (i., (ii)), Question 1: / Statement 2: / S1. / A1), Markdown headings (### Q1), Chinese 第1题:, and the same enumerators mid-line (Q1: … Q2: …, (a) … (b) …). The helper splits lines on \n like the app. - The doc's accepted limit names per-item structured data (JSON objects with ids, YAML, CSV). - Tests: probe4 cases; the v1 -> v2 index upgrade (old index and cached windows dropped, the project indexed again, stale folders pruned) through the extracted loader (private-index.ts); Python unit tests for letters-only and enumerator stripping. - Comment fix (40 letters); cached windows of an older format are pruned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
assassin808
changed the base branch from
fix/original-text-windows-cache
to
main
November 10, 2026 14:09
- Full-width digits (第1题:, Q1:) are folded by NFKC before enumerators are stripped, in the app and the helper; both patterns name [0-9], never \d (ASCII in JS, any digit in Python). - The line pattern is linear: \d+[a-z]?\s*(?:[.)::]\s*|$) instead of a lookahead that backtracked quadratically on long runs of spaces (timing tests on 100k-space lines). - The comment over the private index in telemetry.ts names the current format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Should-fixes from the last review of #94. This PR stacks on #95, the Windows cache fix: it targets that branch, so the diff shows only the follow-ups. Retarget it to
mainonce #95 is merged.More enumerator shapes, removed in both the app (
telemetry-core.tsstripEnumerators) and the helper (hs_original_text.pystrip_enumerators), which use the same patterns:i.,(ii)),Question 1:,Statement 2:,S1.,A1)### Q1), Chinese第1题:Q1: … Q2: …,(a) … (b) …)The helper now splits lines on
\n, like the app.The documented limit now names per-item structured data. Short items written as JSON objects with id keys, YAML entries or CSV rows are inside the accepted beta limit, alongside reordering, HTML tags and Likert labels.
Index upgrade:
private-index.ts, so it can be tested without Electron. The app loads the index through it.Tests:
Fixes the "40 letters or digits" comment, which now says 40 letters.
Tests (macOS, with
HUMANSTUDY_TEST_PYTHONset to the app runtime's Python):npm run typecheck: passespack/runtime/tests: 579 tests OKscripts/tests: 15 tests OK🤖 Generated with Claude Code