aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg.go
AgeCommit message (Collapse)Author
2026-06-20internal/pkg: optionally exempt implementations from cures counterOphestra
This avoids holding up many slots with a long pipeline. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-08all: apply modernisersOphestra
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: do not hold up cures during status linkOphestra
This is a bunch of string operation and a single syscall. Do not hold up queue here. 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: archive unpack artifactOphestra
This unpacks an internal/pkg archive stream used in the upcoming mirror service. 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-23internal/pkg: destroy new substitution status on faultOphestra
This avoids leaving behind the substitution status path of a faulted cure. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-23internal/pkg: report errors exiting cureOphestra
This makes ongoing errors more obvious when multiple failures occur. 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: discontinue DCE resolution on signalOphestra
This serves as a stopgap measure to skip long-running DCE resolutions. 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: 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: 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-05internal/pkg: optionally suppress init verbosityOphestra
This flag applies to every exec artifact cured by the cache. It has no effect on cure outcome. 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-18internal/pkg: pending error alongside done channelOphestra
This significantly simplifies synchronisation of access to identErr. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-18internal/pkg: flush cached errors on abortOphestra
This avoids disabling the artifact until cache is reopened. The same has to be implemented for Cancel in a future change. 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-17internal/pkg: move IR primitives out of cacheOphestra
These are memory management and caching primitives. Having them as part of Cache is cumbersome and requires a temporary directory that is never used. This change isolates them from Cache to enable independent use. 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-07internal/pkg: optional landlock LSMOphestra
The alpine linux riscv64 kernel does not enable Landlock LSM, and kernel compilation is not yet feasible. 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: per-cache SCHED_IDLEOphestra
This is cleaner than setting it globally, and is impossible to race. 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-30all: use filepathOphestra
This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-26internal/pkg: enter exec containerOphestra
This enables much easier troubleshooting of failing cures. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-26internal/pkg: collection helper-artifactOphestra
This was moved from internal/rosa because it is considered generally useful. 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-05internal/pkg: expose status fileOphestra
This is useful for external tooling. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-05internal/pkg: scrub for dangling statusOphestra
These cause build to fail to start. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-04internal/pkg: check filtered errorOphestra
This avoids filtering some unrelated os.ErrExist. 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-15internal/pkg: expose extra methods to fileOphestra
This is useful for FileArtifact processing another stream. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-15internal/pkg: split off context commonOphestra
For making these methods available to RContext. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-11internal/pkg: skip resolved cure errorsOphestra
This significantly improves error resolution performance. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-11internal/pkg: read buffer free listOphestra
Reader has a non-insignificant buffer that is worth saving as well. 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>