aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg_test.go
AgeCommit message (Collapse)Author
2026-08-12internal/pkg: deduplicate unwrapped input errorsOphestra
This avoids repeating errors belonging to multiple instances of the same artifact in different locations in memory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-12internal/pkg: in-flight error resolutionOphestra
The DCE is a slow and overcomplicated solution to a simple problem. This change replaces the DCE by resolving errors in-flight. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-23internal/pkg: optional executable filesOphestra
This enables a FileArtifact implementation to specify whether its resulting file should be executable. This change also implements shebang and ELF magic checks in the file artifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-23internal/pkg: implementation revisionsOphestra
This enables changing the behaviour of an artifact implementation without changing its IR structure. Unfortunately this changes the IR header structure resulting in many rebuilds. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-09internal/pkg: consolidate cache attributesOphestra
This makes the interface stable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-08internal/pkg: expose cure whenceOphestra
Useful for cure determinism validation of KindExec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-07internal/pkg: optional shallow external cureOphestra
This saves time and is often more practical even for package maintainers. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-02internal/pkg: rename inputs methodOphestra
Inputs is more correct than dependencies in the current terminology. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-07internal/pkg: expose measured reader to extern statusOphestra
This is always required by the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-07internal/pkg: replace outcomes from external cacheOphestra
This is primarily useful for implementing a mirror service. This change also works around the zero-dependency FloodArtifact edge case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-07internal/pkg: check for unclean shutdownOphestra
This avoids running into nasty surprises opening a cache that suffered unclean shutdown due to power loss. All other parts of the cache are not prone to inconsistent state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-04internal/pkg: stream decompress artifactOphestra
The tarArtifact predates FileArtifact pipelining. This migrates decompression and buffering into a standalone artifact implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-04internal/pkg: rename archive checksum helpersOphestra
These names are more consistent with other helper names, so rename them while the API is still internal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-02internal/pkg: correctly scrub substitute statusOphestra
Scrubbing for status predates substitutes. This change fixes scrub handling of substitute status entries. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-02internal/pkg: garbage collectionOphestra
This destroys cache entries not referred to by user-specified artifacts and optionally their inputs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: check exec substitutionOphestra
This relies on the testtool having ident as relevant input to assert successful substitution. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: verify status kindOphestra
While it is still impossible to reliably determine the expected contents of these status files, this checks their nature for expected substitution behaviour. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: log fault in tests when availableOphestra
This would otherwise only be available in verbose output, interleaved with everything else. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: record cure faultsOphestra
These are useful for troubleshooting. This change records them in a separate directory. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: populate substitute statusOphestra
These are not created when taking the fast path, but should be inherited from the alternative. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-13internal/pkg: deduplicate DCE by identOphestra
This eliminates edge cases where target artifacts do not compare equal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: DCE benchmark unwrap onlyOphestra
This eliminates noise at lower depths. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: hold artifact in DCEOphestra
This is significantly slower but enables much better error reporting. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: benchmark early DCEOphestra
This error has never had decent performance, now is a good time to improve that. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: content-based dependency substitutionOphestra
This change introduces a new fast path for FloodArtifact. It is taken when a curing artifact has identical-by-content controlled relevant inputs and are otherwise identical to an already-cured artifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-07internal/pkg: optionally register binfmtOphestra
This transparently supports curing foreign exec artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-07internal/pkg: correctly generate cure expectsOphestra
This needs to dereference the identifier symlink. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-06internal/pkg: improve output measuringOphestra
This significantly improves readability and maintainability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-23internal/pkg: record cache variant on-diskOphestra
This makes custom artifacts much less error-prone to use. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18internal/pkg: drop cached error on cancelOphestra
This avoids disabling the artifact when using the individual cancel method. Unfortunately this makes the method blocking. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-17internal/pkg: abort all pending curesOphestra
This cancels all current pending cures without closing the cache. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-17internal/pkg: fine-grained cancellationOphestra
This enables a specific artifact to be targeted for cancellation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-15internal/pkg: pass impure job countOphestra
This is cleaner than checking cpu count during cure, it is impossible to avoid impurity in both situations but this is configurable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-10internal/landlock: relocate from package containerOphestra
This is not possible to use directly, so remove it from the public API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-07all: optionally forbid degrading in testsOphestra
This enables transparently degradable tests to be forced on in environments known to support them. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-07internal/pkg: transparently degrade landlock in testsOphestra
This does not test package container, so should transparently cope with Landlock LSM being unavailable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-03internal/pkg: optionally suppress via assumed checksumOphestra
This is quite error-prone and causes cache inconsistency similar to the store inconsistency seen on nix when a similar condition happens. Keep this behind a flag in case it is ever beneficial. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-03internal/pkg: cache flagsOphestra
This is cleaner for extending the API. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17internal/stub: move from containerOphestra
This package solves a very specific stubbing use case, in a less than elegant manner. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17fhs: move from containerOphestra
This package is not container-specific. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17check: move from containerOphestra
This package is not container specific, and widely used across the project. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-04internal/pkg: write per-artifact logsOphestra
This is currently only used by execArtifact. A later patch will add additional logging facilities. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-05internal/pkg: standardise artifact IROphestra
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-03internal/pkg: improve error resolutionOphestra
This was taking way too long for early failures. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: encode checksum in identOphestra
This also rearranges the ident ir to be more predictable, and avoids an obvious and somewhat easy to get into inconsistent state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: exclusive artifactsOphestra
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose response bodyOphestra
This uses the new measured reader provided by Cache. This should make httpArtifact zero-copy. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose underlying readerOphestra
This will be fully implemented in httpArtifact in a future commit. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-24internal/pkg: block on implementation entryOphestra
This avoids blocking while not in Cure method of the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-19internal/pkg: make checksum available to cureOphestra
This enables deduplication by value as implemented in execArtifact. Signed-off-by: Ophestra <cat@gensokyo.uk>