Skip to content

fix(go): preserve failing test location context - #994

Merged
aeppling merged 1 commit into
rtk-ai:developfrom
em0t:fix/go-test-failure-context
Apr 3, 2026
Merged

aeppling merged 1 commit into
rtk-ai:developfrom
em0t:fix/go-test-failure-context

Conversation

@em0t

@em0t em0t commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep file-and-line failure locations in compact rtk go test output instead of dropping them when they do not contain keywords
  • preserve the first follow-up context line after a foo_test.go:42: location entry so assertion messages remain readable
  • add regression coverage for failed test output that uses a location line followed by an indented explanation

Minimal Case

Raw

foo_test.go:42:
    values differ after normalization

Previous RTK

foo (0 passed, 1 failed)
  [FAIL] TestFail

This PR

foo (0 passed, 1 failed)
  [FAIL] TestFail
     foo_test.go:42:
     values differ after normalization

Testing

  • cargo fmt --all
  • cargo clippy --all-targets
  • cargo test --all

Notes

  • cargo clippy --all-targets still reports pre-existing warnings outside this change set

@CLAassistant

CLAassistant commented Apr 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@em0t
em0t force-pushed the fix/go-test-failure-context branch from 9967235 to 14ee570 Compare April 3, 2026 09:36
@em0t
em0t changed the base branch from master to develop April 3, 2026 09:36
@em0t
em0t force-pushed the fix/go-test-failure-context branch from 14ee570 to 03e53a9 Compare April 3, 2026 09:39
@em0t
em0t force-pushed the fix/go-test-failure-context branch from 03e53a9 to 374fe64 Compare April 3, 2026 10:09
@em0t

em0t commented Apr 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Could a maintainer please approve and run workflows so CI can start for review?

@aeppling aeppling self-assigned this Apr 3, 2026
@aeppling aeppling added the awaiting-information Waiting for reporter to provide more info label Apr 3, 2026
@aeppling

aeppling commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Valid and clean, thanks for contributing

@aeppling
aeppling merged commit 1481bc5 into rtk-ai:develop Apr 3, 2026
9 checks passed
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
fix(go): preserve failing test location context
thehoff pushed a commit to thehoff/contextcrawler that referenced this pull request May 14, 2026
fix(go): preserve failing test location context
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-information Waiting for reporter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants