Skip to content

Allow absolute artifact paths only as metadata - #61

Merged
timkpaine merged 1 commit into
mainfrom
tkp/absolute-paths-carried-not-acted-on
Oct 8, 2026
Merged

timkpaine merged 1 commit into
mainfrom
tkp/absolute-paths-carried-not-acted-on

Conversation

@timkpaine

Copy link
Copy Markdown
Member

#57 refused absolute artifact paths at construction. Running dau-build's suite against artlink main shows that breaks 38 of its tests: dau-build's artifact model records where each output landed on the build host (bitstreams, reports, generated inputs, contributing HDL sources from other checkouts), as absolute paths, and reads them back the same way. CI did not catch it because dau-build installs the released artlink.

This keeps the containment where artlink acts on a path and drops it where artlink only carries one:

  • The model refuses a path that climbs out of its manifest root with .., and accepts an absolute path as "a file on this host".
  • ArtifactRegistry.artifact_file_path, build_package_archive and build_materialization_plan refuse an absolute path explicitly (before this they would have resolved outside the root, tried to pack it under the package root, or written it at an absolute destination; Fix artifact path containment and archive validation #58's resolved-path checks would have caught the last two, but with a less direct message).
  • The README says so. A test carries an absolute path through the model and checks all three refusals.

This partly reverses one line of the readiness decision; the alternative, moving dau-build and its consumers to manifest-relative paths plus file: URIs for external provenance, is a multi-repository change that the containment the registry and materializer already enforce does not justify.

The readiness pass refused absolute paths at construction, which broke dau-build: its whole artifact model records where an output landed on the build host. The model now refuses only a path that climbs out of its manifest root with .., and the three places artlink would act on a path (registry resolution, packaging, materialization planning) refuse an absolute one explicitly instead.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Test Results

76 tests  +1   76 ✅ +1   5s ⏱️ +2s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit e36b45f. ± Comparison against base commit d511656.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
artlink.tests.test_artifact ‑ test_artifact_paths_stay_inside_the_manifest_root
artlink.tests.test_artifact ‑ test_an_absolute_path_is_carried_but_never_acted_on
artlink.tests.test_artifact ‑ test_artifact_paths_do_not_climb_out_of_the_manifest_root

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.52%. Comparing base (d511656) to head (e36b45f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   91.39%   91.52%   +0.13%     
==========================================
  Files          30       30              
  Lines        2625     2644      +19     
  Branches      223      225       +2     
==========================================
+ Hits         2399     2420      +21     
+ Misses        136      134       -2     
  Partials       90       90              

☔ 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.

@timkpaine
timkpaine merged commit 24feca4 into main Oct 8, 2026
4 checks passed
@timkpaine
timkpaine deleted the tkp/absolute-paths-carried-not-acted-on branch October 8, 2026 15:57
@timkpaine timkpaine changed the title Carry absolute artifact paths on the model, refuse to act on them Allow absolute artifact paths only as metadata Oct 8, 2026
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.

1 participant