Skip to content

implementing forge trace - #397

Open
stschiff wants to merge 6 commits into
masterfrom
addForgeTrace
Open

implementing forge trace#397
stschiff wants to merge 6 commits into
masterfrom
addForgeTrace

Conversation

@stschiff

@stschiff stschiff commented Aug 10, 2026

Copy link
Copy Markdown
Member

This PR implements a Forge Trace, which addresses #251.

The implementation is radically simple:

  • Every forge output which writes Janno, adds a new column "ForgeTrace" which lists for each sample the name and the package version that the sample came from.
  • If ForgeTrace already exists, a new trace is appended with ;.
  • There is no special rule for one-package forges, so even subsetting packages results in a ForgeTrace.

What do you think?
The package is not hard to review, the only relevant changes are in Forge.hs. But of course there are tons of Forge Test packages, which all had to be updated for the golden tests to pass.

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 52.34%. Comparing base (e07f6c7) to head (b0d91a3).

Files with missing lines Patch % Lines
src/Poseidon/CLI/Trident/Forge.hs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #397      +/-   ##
==========================================
+ Coverage   52.28%   52.34%   +0.05%     
==========================================
  Files          37       37              
  Lines        6049     6058       +9     
  Branches      648      648              
==========================================
+ Hits         3163     3171       +8     
- Misses       2238     2239       +1     
  Partials      648      648              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stschiff
stschiff marked this pull request as ready for review August 10, 2026 15:17
@stschiff
stschiff requested a review from nevrome August 10, 2026 15:17
@stschiff

Copy link
Copy Markdown
Member Author

I thought some more about it and decided to rename the new column to SourcePackage to make it a bit more tool-agnostic.

@nevrome nevrome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for looking into this! @TCLamnidis will be happy to hear that this will be added soon. I just have three comments:

  1. I think adding/updating this new column should not be the default, but a forge option. We could call it --trace or --docSourcePac or something like this. To illustrate why I would find this annoying as a default behaviour: I recently prepared the patched versions of the AADR v66 packages. There I wanted a minimal diff to keep things human-readable. A new column would have been very irritating in this context.
  2. SourcePackage does not fit with the usual column naming scheme in Pascal_Snake_Case. Maybe we should go with Source_Package.
  3. Maybe we should add a more complex test case where a package with the Source_Package column gets forged a second time, to see the concatenation in action. Maybe even from two different source packages.

@stschiff

Copy link
Copy Markdown
Member Author

Yes to all! One advantage of fixing 1) is that the golden tests won't all get updated. I'll get to it.

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.

2 participants