aglinxinyuan opened a new pull request, #8066:
URL: https://github.com/apache/texera/pull/8066

   ### What changes were proposed in this PR?
   
   Five existing frontend specs extended. **+16 fully-covered lines and +8 
branch arms.**
   
   | File | Codecov lines | Branch arms |
   |---|---|---|
   | `build-version.js` | 8/15 → **15/15** | 2/3 → **4/4** |
   | `user-config.service.ts` | 60/63 → **63/63** | 31/33 → **33/33** |
   | `agent-registration.component.html` | 46/48 → **48/48** | 7/10 → **10/10** 
|
   | `code-editor.service.ts` | + 1 line | + 1 arm |
   | `notebook-migration.service.ts` | + 1 line | — |
   
   `build-version.js` carries most of it: lines 42–46 and 53 were never 
executed and 52 was partial. Its arm total rises from 3 to 4 rather than 
staying fixed, because loading the script as raw CJS also records the 
`buildNumber = generate(version)` default-parameter branch that the transformed 
import never emitted — worth stating, since a reader comparing arm totals would 
otherwise think the denominator moved for no reason.
   
   `agent-registration.component.html` gains **zero** on plain line-hit (48/48 
both before and after) and moves only on Codecov's metric, by completing three 
branch arms. The two numbers are not interchangeable and both are given.
   
   **Deliberately excluded: every `stub-*.service.ts`.** Those six files hold 
29 further missed lines — more than this whole PR — but they are test doubles, 
not production code, so covering them would be padding. One of them 
(`stub-user-project.service.ts`, 18 missed lines) is being deleted outright by 
the open project-removal work.
   
   ### Verification
   
   **21 mutations, no survivors.** Every one was re-derived from scratch on the 
shipping tree: snapshot first, anchor asserted to occur exactly once, one 
mutant at a time, hash-equality plus an empty non-spec diff verified 
immediately before each run, reverted from the snapshot rather than from git.
   
   **19 of the 21 die to exactly one test** with the rest of the file green. 
The other two are named rather than rounded up: the `writeFileSync` payload 
exchange also kills "announces the build number it produced" (the manifest 
stops being parseable JSON), and the error-ternary exchange at 
`agent-registration.component.ts:104` also kills a sibling.
   
   The baseline was re-measured rather than inherited: specs backed up to a 
scratch dir, each restored **by exact single file path** (never a directory), 
`git status --porcelain --untracked-files=all` confirmed empty, then the 
literal CI command body run — `nx test --watch=false --progress=false 
--coverage --coverage-reporters=lcovonly` from `frontend/`, which is what `yarn 
--cwd frontend run test:ci` executes and whose lcov is uploaded under the 
`frontend` flag. Specs were then restored and the restored diff byte-verified 
against the saved patch before the second run. Both lcovs were parsed with a 
script implementing Codecov's rule directly: a line counts only if its `DA` hit 
is non-zero **and** every `BRDA` arm on it is taken.
   
   Whole suite: **5208 passed + 1 skipped → 5220 passed + 1 skipped**, 204/204 
files both times. The single skip is pre-existing and untouched.
   
   One correction to an earlier draft of this bundle: it implied the 
agent-registration spec started from a different test count than it did. The 
real per-spec counts are 7→10, 20→22, 4→5, 37→39, 15→19.
   
   `yarn format:ci` passes. `frontend/junit.xml` and `frontend/coverage/` are 
regenerated by every run and are not committed. No production file is touched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #8064
   
   ### How was this PR tested?
   
   ```
   npx ng test --watch=false --include="**/build-version.spec.ts" 
--include="**/user-config.service.spec.ts" 
--include="**/code-editor.service.spec.ts" 
--include="**/notebook-migration.service.spec.ts" 
--include="**/agent-registration.component.spec.ts"
   ```
   
   ```
    Test Files  5 passed (5)
         Tests  95 passed (95)
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to