You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/10 04:59:29 UTC

[PR] test(agent-service): pin the context serializer and the execution tools [texera]

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

   ### What changes were proposed in this PR?
   
   `context-utils.ts` builds the prompt the agent reasons over and `workflow-execution-tools.ts` turns
   an execution result into the table it reads back. Both looked reasonably covered and were not:
   `bun` credits a whole function body once entered, so blocks inside `jsonToTableFormat` and
   `executeOperatorAndFormat` counted as covered while nothing asserted them.
   
   Adds 15 tests across the two existing specs (no new spec files — one spec per source class, both
   already existed).
   
   | File | Before | After |
   |---|---|---|
   | `context-utils.ts` | 60.00% funcs / 77.83% lines | **100% / 100%** |
   | `workflow-execution-tools.ts` | 58.97% funcs / 91.24% lines | 85.71% / 95.16% |
   
   **Ten of the killed mutations target lines `bun` already called covered** — the DAG topological
   ordering and its target-rank tie-break, port-ordinal mapping, the `NULL`/`null`/`undefined`/object
   cell rendering, the row-gap ellipsis, the leading-tab header, and the schema-violation messages.
   The file percentage barely moves for those; the pinning is the point.
   
   ### Verification
   
   45 mutations were applied to the production files and reverted, each revert confirmed with
   `git diff --quiet` before the next. All 45 turned the suite red.
   
   An adversarial re-check then found **two assertions that were vacuous anyway**, which is the part
   worth reporting:
   
   | Survivor | Why it passed | Fix |
   |---|---|---|
   | `Math.ceil` → `Math.round` on the execution timeout | the fixture was `4500 ms`, and `ceil(4.5) == round(4.5) == 5`, so the assertion commented "rounds up" proved nothing | fixture changed to `4200 ms`, which separates ceil (5) from round and floor (4) |
   | `getConfig()` hoisted out of the `execute` closure | the test invoked the tool once, so `toHaveBeenCalledTimes(1)` holds whether the config is resolved per invocation or captured once at construction | invoke twice with the workflow id changing in between, and assert the second request URL reflects the second config |
   
   Both mutations are now red, and so is `Math.floor`. Production diff empty.
   
   ### Deliberately not included
   
   Three regions of `workflow-execution-tools.ts` are left uncovered because they are dead, confirmed
   by inserting `throw new Error(...)` at the top of each and running the whole 273-test module — all
   still passed, so nothing reaches them:
   
   - `formatWorkflowValidationErrors` (169–178) — no call site.
   - lines 221–226 and 229–233.
   
   Testing them would cement code that should be deleted instead.
   
   No production file is touched.
   
   ### Any related issues, documentation, discussions?
   
   Closes #7504
   
   ### How was this PR tested?
   
   ```
   bun test
   ```
   
   ```
    273 pass
    0 fail
   ```
   
   15 new on top of the existing 258. `bun run typecheck` and `bun run format:check` both pass.
   
   ### 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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(agent-service): pin the context serializer and the execution tools [texera]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7505:
URL: https://github.com/apache/texera/pull/7505#issuecomment-5236064624

   <!-- texera-reviewer-suggestion -->
   ### Automated Reviewer Suggestions
   
   Based on the `git blame` history of the changed files, we recommend the following reviewers:
   
   - **Contributors with relevant context:** `@mengw15`
     You can notify them by mentioning `@mengw15` in a comment.
   


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(agent-service): pin the context serializer and the execution tools [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #7505:
URL: https://github.com/apache/texera/pull/7505#issuecomment-5243178144

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/7505?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 85.66%. Comparing base ([`42d08a3`](https://app.codecov.io/gh/apache/texera/commit/42d08a3701cd06542bcfa92728116302723b2536?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d0d9cb1`](https://app.codecov.io/gh/apache/texera/commit/d0d9cb1447e8497d2dba8d9f3ae1af224103e5d6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #7505      +/-   ##
   ============================================
   - Coverage     86.38%   85.66%   -0.73%     
   + Complexity     4211     4150      -61     
   ============================================
     Files          1169     1169              
     Lines         46750    46734      -16     
     Branches       5203     5202       -1     
   ============================================
   - Hits          40387    40034     -353     
   - Misses         4641     4986     +345     
   + Partials       1722     1714       -8     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
   |---|---|---|---|
   | [access-control-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [agent-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `89.01% <ø> (+2.13%)` | :arrow_up: | |
   | [amber](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `80.87% <ø> (-1.00%)` | :arrow_down: | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.72% <ø> (ø)` | | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [config-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `65.97% <ø> (ø)` | | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [file-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `69.05% <ø> (ø)` | | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [frontend](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `88.11% <ø> (-1.12%)` | :arrow_down: | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.89% <ø> (ø)` | | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [pyamber](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `97.51% <ø> (-0.06%)` | :arrow_down: | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/7505/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.31% <ø> (ø)` | | Carriedforward from [114a610](https://app.codecov.io/gh/apache/texera/commit/114a6100b53c1191a77b23b9b11221fd6607fef1?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/7505?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(agent-service): pin the context serializer and the execution tools [texera]

Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 merged PR #7505:
URL: https://github.com/apache/texera/pull/7505


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org