Repository navigation
feat(task): audit artifact cache declarations - #11617
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryAdds an opt-in Linux task-cache audit that traces filesystem activity and warns about accesses outside declared sources and outputs.
Confidence Score: 4/5The PR is not yet safe to merge because relative non-*at filesystem accesses after a subprocess changes directory can still be audited against the wrong path. The new fd-annotation parsing corrects relative Files Needing Attention: src/task/task_cache_audit.rs Important Files Changed
Reviews (11): Last reviewed commit: "feat(task): audit artifact cache declara..." | Re-trigger Greptile |
8964563 to
4efc855
Compare
4efc855 to
dc0509a
Compare
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
dc0509a to
f46ea52
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f46ea52. Configure here.
f46ea52 to
ceb86bb
Compare
ceb86bb to
7f3c9cd
Compare
7f3c9cd to
00d378b
Compare
11bbabf to
dd59e34
Compare
dd59e34 to
db83e20
Compare
## Summary - add an opt-in `cache.audit` mode for task artifact cache declarations - trace Linux task execution with `strace` and warn about undeclared project reads and writes - keep auditing advisory, bounded, and disabled when tracing is unavailable - expose the option in task schemas and documentation - cover classification, cache publication, and task-info serialization ## Validation - `mise run test:e2e e2e/tasks/test_task_artifact_cache_audit e2e/tasks/test_task_info` - `cargo test --all-features task_cache_audit::tests -- --nocapture` - `cargo clippy --workspace --all-features --all-targets -- -D warnings` - `mise run lint-fix` - `mise run render:schema` *AI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.* <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Changes are opt-in and Linux-only for tracing; execution path only wraps commands when audit is enabled, with graceful fallback when strace is unavailable. > > **Overview** > Adds opt-in **`cache.audit`** on experimental task artifact caching so teams can spot incomplete `sources` / `outputs` declarations. > > On **Linux**, when audit is enabled and caching is on, mise wraps the real task command with **`strace`**, parses file syscalls after the run, and **warns** about undeclared reads under the workspace source root and undeclared writes under the task directory. Auditing is **advisory** (tasks still succeed and can still be cached); it is skipped for raw/dry-run runs, when `strace` is missing, or on non-Linux (warn once). Cache hits do not run the task, so **`mise run --force`** is needed to audit an existing entry. > > Configuration is wired through **`TaskCacheConfig`**, JSON schemas, docs, and **`mise tasks info`**. Source matching for audits reuses a shared **`task_source_match_root`** helper extracted from the source checker. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit db83e20. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->

Summary
cache.auditmode for task artifact cache declarationsstraceand warn about undeclared project reads and writesValidation
mise run test:e2e e2e/tasks/test_task_artifact_cache_audit e2e/tasks/test_task_infocargo test --all-features task_cache_audit::tests -- --nocapturecargo clippy --workspace --all-features --all-targets -- -D warningsmise run lint-fixmise run render:schemaAI-assisted — Tool: Codex; model: unavailable/unavailable; version: unavailable.
Note
Low Risk
Changes are opt-in and Linux-only for tracing; execution path only wraps commands when audit is enabled, with graceful fallback when strace is unavailable.
Overview
Adds opt-in
cache.auditon experimental task artifact caching so teams can spot incompletesources/outputsdeclarations.On Linux, when audit is enabled and caching is on, mise wraps the real task command with
strace, parses file syscalls after the run, and warns about undeclared reads under the workspace source root and undeclared writes under the task directory. Auditing is advisory (tasks still succeed and can still be cached); it is skipped for raw/dry-run runs, whenstraceis missing, or on non-Linux (warn once). Cache hits do not run the task, somise run --forceis needed to audit an existing entry.Configuration is wired through
TaskCacheConfig, JSON schemas, docs, andmise tasks info. Source matching for audits reuses a sharedtask_source_match_roothelper extracted from the source checker.Reviewed by Cursor Bugbot for commit db83e20. Bugbot is set up for automated code reviews on this repo. Configure here.