Relative predicate file watches ignore the workspace directory
I maintainer di solito rispondono entro 5 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Start in src/predicate_cache.rs at Fingerprints::capture, which passes the stored relative watchFile path to FileFingerprint::of; compare that with PredicateContext::cwd and the validation lookup. The regression case is relative_watch_tracks_the_declared_workspace in anchor-book/reconciliation/probes.rs; run python3 anchor-book/reconciliation/run-probes.py to see the counter stay at one line. Done means the relative path resolves against the workspace for both storage and lookup, that probe passes, and existing cache tests stay green.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happens
A custom predicate's relative watchFile path is fingerprinted against the process working directory instead of the predicate's workspace directory. Creating the watched file in that workspace does not invalidate the persisted result when the two directories differ.
Steps to reproduce
-
With Rust 1.99.1, Python 3, and a POSIX shell available, start from a clean checkout of the published reproduction branch:
git clone --branch codex/configuration-trial https://github.com/kwdev/symposium.git symposium-cache-repro cd symposium-cache-repro git checkout 12df46340d2e125b61577bbc427d256ea4ab11b0 cargo fetch --locked python3 anchor-book/reconciliation/run-probes.pyThe initial dependency fetch needs network access; the diagnostic runs Cargo offline. The runner temporarily exposes the existing predicate module and installs a test target, then restores the source and removes that target. It changes no implementation logic and launches no agent or model.
-
Inspect
relative_watch_tracks_the_declared_workspacein the committed probe. It creates a fresh temporary workspace, cache, and counter, then registers this custom predicate script;$1is the absolute counter path:echo x >> "$1" echo '{"watchFile":"book-reconciliation-watched-file"}'This is a library-level reproduction, so no
config.tomlor plugin manifest is required. The context is created withPredicateContext::with_custom_predicates,.with_cwd(Some(workspace)), and.with_disk_cache(cache_path). The process stays in the repository directory. -
Evaluate the predicate with the watched file absent, then persist the cache.
-
Create
book-reconciliation-watched-fileinside the temporary workspace. Create a fresh context with the same workspace and cache, and evaluate again. Assert that the counter contains two lines, proving the file's appearance caused reevaluation.
The runner executes four reconciliation probes. This report concerns the named relative-watch test; the disablement failures are already covered by #290 and PR #423.
Actual result
The counter contains one line. Exact assertion output from the published revision:
assertion `left == right` failed: workspace file appearance did not invalidate the cache
left: 1
right: 2
The test is reported as relative_watch_tracks_the_declared_workspace ... FAILED; the diagnostic exits 101. A fresh context is used for the second evaluation, so this result demonstrates persistent-cache behavior independently of same-context memory reuse.
Expected result
The relative watch refers to the file inside the declared workspace. Its transition from absent to present invalidates the cached result, executes the predicate again, and produces two counter lines.
The existing predicate-caching RFD explicitly says “Files are relative to the workspace root” and that a change to any watched input causes reevaluation.
Environment
- Symposium: 0.7.0; reproduced on fork commit
12df46340d2e125b61577bbc427d256ea4ab11b0, containing upstream3516c051c07838bdde94ea780138a8ac1c3a79a1. The reproduction branch adds Book content and diagnostics; it does not fix this behavior. - Agent: N/A — direct library test, no vendor agent involved.
- OS: Linux x86_64, kernel
6.12.115-140.210.amzn2023.x86_64. - Rust:
rustc 1.99.1 (58cf8f9c3 2026-10-13). - Reproduced: 2026-11-24.
Notes
Suspected cause: Fingerprints::capture passes the stored relative path directly to FileFingerprint::of. Both entry creation and validation use that path without resolving it against PredicateContext::cwd. A fix should preserve workspace meaning across storage and lookup and retain this assertion as a regression test.
How this was found: During an AI-assisted reconciliation with Codex before proposing Anchor Book integration, we compared the draft Book's A-cache-declared-validity anchor and cache-boundaries criterion with the existing RFD, code, and test assertions. The relative-path obligation prompted a probe with an explicit workspace distinct from process cwd. The existing workspace suite passed 2,160 tests, with 29 skipped, during the reconciliation; this additional probe exposed an uncovered case. The draft Book helped direct the investigation; the workspace-relative rule already exists in the RFD.
- Published branch:
codex/configuration-trial - Reconciliation findings at the tested commit
- Related design/implementation: #262 and #268. Open and closed issues, PRs, and discussion comments were checked before filing; no matching bug report was found.
- Lingua principale
- Rust
- Stelle
- 247
- Fork
- 30
- Merge medio
- 4g 19h
- PR unite (30g)
- 44
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di symposium-dev/symposium
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
symposium-dev/symposium#530 ·
I maintainer di solito rispondono entro 5 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
symposium-dev/symposium#406 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
symposium-dev/symposium#369 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
symposium-dev/symposium#208 ·
I maintainer di solito rispondono entro 5 giorni
-
ACP test setup leaks session settings into the test processForse già presa @gmemuriuki l’ha presa oggi. Apertabug
symposium-dev/symposium#527 · 1 assegnatario ·
I maintainer di solito rispondono entro 5 giorni
Tutte le issue di symposium-dev/symposium
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
topgrade-rs/topgrade#2540 ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid JSON options for ngram and edge_ngram silently use defaultsForse già presa @Tilendlesa l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
noemaforge/vimanam#153 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 3 giorni