Aller au contenu

Action Logbook — FileCleaner Project

Governance Rule (AGENTS.md §2 & .agents/rules/project-governance.md): This Action Logbook MUST be systematically updated on every request, every change, and every result (strictly in English). - Every new request is logged under "1. Ongoing Actions (IN PROGRESS)" as soon as its GitHub Issue is opened. - Once validated by Rust formatting, Clippy, and unit/integration tests (cargo fmt, cargo clippy, cargo test) and its Pull Request is created/merged, the entry is completed with the exact Changes and quantified Result, then moved under "2. Completed Actions (COMPLETED)".


1. Ongoing Actions (IN PROGRESS)

Action ID Date / Time (ISO) Issue / Branch Status Request, Ongoing Changes & Expected Results
None — — — All tracked tasks are completed.

2. Completed Actions (COMPLETED)

ACT-009 — Release v1.0.1 and Publish Multi-Arch Docker Hub Image (jmrenouard/filecleaner) (Issue #22)

  • Date / Time (ISO): 2026-11-20T22:23:00Z
  • Issue / Branch: #22 (chore/issue-22-release-v1.0.1-dockerhub)
  • Request: Prepare and ship GitHub Release v1.0.1 alongside hardened multi-architecture (linux/amd64, linux/arm64) Docker Hub publishing (jmrenouard/filecleaner) modeled on jmrenouard/cis_benchmarks_tools.
  • Changes:
  • Provisioned DOCKERHUB_USERNAME and DOCKERHUB_TOKEN (dedicated repo-admin PAT saved in KeePass Dev-Secrets) in jmrenouard/FileCleaner repository secrets via in-memory Python injection (zero plaintext output).
  • Created multi-stage hardened Dockerfile (rust:1.100.0-bookworm builder -> non-root debian:bookworm-slim UID/GID 10001 fcuser:fcgroup, VOLUME mountpoints, HEALTHCHECK, exec entrypoint) and .dockerignore, verified with lint_dockerfile.py --fail-on info (HIGH 0 WARN 0 INFO 0).
  • Created SHA-pinned multi-platform publishing workflow .github/workflows/docker-publish.yml targeting jmrenouard/filecleaner (latest, v1.0.1, 1.0.1) with OCI and com.filecleaner.release-notes labels and preflight check.
  • Bumped crate version to 1.0.1 in Cargo.toml and Cargo.lock, cut ## [1.0.1] - 2026-11-20 in CHANGELOG.md, authored docs/RELEASE_NOTES_v1.0.1.md, updated EN/FR documentation (README.md, README.fr.md, docs/en/{USER_GUIDE,COOKBOOK_EXAMPLES,SPECIFICATIONS}.md, docs/fr/{GUIDE_UTILISATEUR,EXEMPLES_RECETTES,SPECIFICATIONS}.md), and added workflow + Dockerfile security assertions in tests/governance_and_docs_test.rs.
  • Result:
  • Verified in WSL2 (CARGO_TARGET_DIR=/var/tmp/filecleaner-target-rel): cargo fmt --all -- --check PASS, 3-target cargo clippy --all-targets -- -D warnings PASS (0 warnings), cargo test --all-targets PASS (125/125: 64 unit + 61 integration across 9 suites), and cargo llvm-cov --fail-under-lines 90 PASS (94.31% lines / 92.45% regions across 9,098 lines).
  • Verified local container build (docker build -t jmrenouard/filecleaner:1.0.1 .) and live container execution (filecleaner 1.0.1, uid=10001(fcuser), /data sweep 2 evaluated, 1 acted, and bundled example validation).

ACT-008 — Post-v1.0.1 Ponytail Audit Fixes, Expanded Test Suite, and Bilingual 5-Minute HOWTO (Issue #20)

  • Date / Time (ISO): 2026-11-20T18:45:00Z
  • Issue / Branch: #20 (feat/issue-20-audit-tests-simple-howto)
  • Request: Remediate post-v1.0.1 code audit edge cases, expand unit/integration/E2E test coverage across all modules (>= 90% per module), and add a simple bilingual 5-minute HOWTO guide with verified documentation config blocks.
  • Changes:
  • Audited & fixed 5 bugs/gaps plus lean cleanup:
    • src/hooks.rs: Bounded stderr capture (MAX_HOOK_STDERR_BYTES = 64 KiB at UTF-8 boundaries) with Arc<Mutex<Vec<u8>>> + STDERR_DRAIN_GRACE so failing hooks leaving background grandchildren still report stderr cleanly.
    • src/config.rs: Validated rename_template strftime templates eagerly inside Config::validate().
    • src/cli.rs: Auto-enabled ActionStep::RenameByDate in build_adhoc_config whenever --rename-template is provided.
    • src/daemon.rs: Enforced is_live_filecleaner_pid(pid) (is_pid_alive + is_filecleaner_process) in daemon_status and claim_pid_file to handle recycled OS PIDs safely.
    • src/scanner.rs: Simplified compile_rule_matchers to reuse trimmed filename_date_regex.
  • Expanded tests (src/config.rs, src/scanner.rs, src/audit.rs, src/in_use.rs, src/daemon.rs, src/cli.rs, tests/hooks_pre_delete_test.rs, tests/actions_pipeline_test.rs, tests/cli_validate.rs, tests/daemon_and_cli_test.rs, tests/governance_and_docs_test.rs) and created tests/product_workflows_e2e_test.rs (howto_workflow_1..4).
  • Added docs/en/HOWTO.md and docs/fr/HOWTO.md, updated cross-links in README.md, README.fr.md, docs/en/USER_GUIDE.md, docs/fr/GUIDE_UTILISATEUR.md, docs/en/COOKBOOK_EXAMPLES.md, and docs/fr/EXEMPLES_RECETTES.md (fixing check-in-use --json schema example), and updated CHANGELOG.md and docs/RCA_REGISTER.md (RCA-007).
  • Result:
  • Verified in WSL2 (CARGO_TARGET_DIR=/var/tmp/filecleaner-target-plan): cargo fmt --all PASS, cargo clippy --all-targets -- -D warnings PASS (0 warnings across Linux, x86_64-pc-windows-gnu, aarch64-apple-darwin), cargo test --all-targets PASS (124/124: 64 unit + 60 integration across 9 suites), and cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90 PASS (94.31% lines / 92.45% regions across 9,098 lines; every src/*.rs module >= 90.21%: actions.rs 90.21%, audit.rs 92.89%, cli.rs 94.14%, config.rs 95.81%, daemon.rs 94.07%, engine.rs 97.82%, error.rs 100.00%, hooks.rs 95.54%, in_use.rs 93.58%, main.rs 100.00%, policy.rs 94.82%, scanner.rs 93.63%). PR #21 submitted and re-verified on windows-latest CI after Windows NTFS/share-mode/TOML array fixes (RCA-008).

ACT-007 — Remediate All 14 Ponytail Security, Correctness, Scale, and CI Audit Findings (Issue #18)

  • Timestamp: 2026-11-20T14:01:41Z
  • Issue / Branch: #18 (fix/issue-18-ponytail-security-audit)
  • Request: Remediate all 14 Ponytail audit findings across FileCleaner (v1.0.0) using minimal, pure-Rust stdlib-first fixes with zero new Cargo.toml dependencies, full regression test coverage (>= 90%), 5/5 multi-OS CI validation, and synchronized governance/documentation updates.
  • Changes:
  • src/actions.rs & src/engine.rs: Enforced non-following regular-file opens (O_NOFOLLOW + (dev, ino) verification on Unix; FILE_FLAG_OPEN_REPARSE_POINT + reparse-attribute check on Windows), 0o600 .fc-tmp private staging (open_staged_tmp_private), execute_copy_truncate pre/post (dev, ino) identity continuity, pre-execute symlink verification (!rule.follow_symlinks), and idempotent Compress/RenameByDate (has_compressed_extension, has_trailing_date_stamp); wired SweepLockProbe::default(), run_config_precompiled, and check_batch_scoped.
  • src/hooks.rs: Replaced piped stdout with Stdio::null(), capped stderr capture to 64 KiB via sync_channel (50 ms drain grace) to prevent grandchild FD-2 pipe deadlocks, isolated Unix children via process_group(0), and added kill_hook_process_tree (SIGKILL to -pgid on timeout).
  • src/audit.rs & src/daemon.rs: Added 0o600 private permissions on audit.jsonl, pid_file, state_file, and stop_file (write_atomic_bytes_with_mode), single-generation 50 MiB <audit_log>.1 rotation (DEFAULT_AUDIT_ROTATE_BYTES, AuditLogger::open_with_max_bytes), is_filecleaner_process PID verification in daemon_stop before writing stop_file or signaling SIGTERM, STOP_POLL_SLICE = 200 ms, precompiled sweep loop (Scanner::compile_config), <audit_log>.1 watcher exclusion, and deleted duplicate normalize_lexical.
  • src/config.rs, src/scanner.rs, src/policy.rs, src/in_use.rs, & src/cli.rs: Unified lexical path resolution on crate::config::resolve_path_lexically, centralized CompiledRuleMatchers / compile_rule_matchers, added scanner-level in-place idempotency skip and <audit_log>.1 guard, fixed RetentionEngine::plan removes_file / reclaims_bytes and RuleOutcome::Constrained accounting (reusing compute_protected_floor_paths), added non-exclusive LockProbe::check_os_lock_readonly (LOCK_SH | LOCK_NB / FILE_SHARE_READ), SweepLockProbe single-pass OnceLock /proc snapshot (removing redundant read_link), non-intrusive check_batch_scoped probe ordering, batched InUseDetector::check_paths, and deleted duplicate write_atomic_cli_file.
  • .github/workflows/ci.yml & .github/workflows/release.yml: Pinned all uses: steps to 40-char commit SHAs, moved ${{ ... }} values to env:, and scoped contents: write strictly to publish-release.
  • Integration Tests: Updated tests/actions_pipeline_test.rs, tests/hooks_pre_delete_test.rs, tests/retention_age_size_count_test.rs, tests/in_use_detection_test.rs, tests/daemon_and_cli_test.rs, and tests/governance_and_docs_test.rs.
  • Governance & Bilingual Docs: Updated docs/ACTION_LOGBOOK.md, docs/RCA_REGISTER.md (RCA-006, APP-002), CHANGELOG.md, docs/en/SPECIFICATIONS.md, and docs/fr/SPECIFICATIONS.md (62/62 heading parity).
  • Result:
  • Local WSL2 verification (CARGO_TARGET_DIR=/var/tmp/filecleaner-target-verify): cargo fmt --all -- --check PASS (0 diffs); cargo clippy --all-targets -- -D warnings PASS (Linux, 0 warnings); cross-target cargo clippy --lib --bins --tests -- -D warnings PASS for x86_64-pc-windows-gnu and aarch64-apple-darwin (0 warnings); cargo test --all-targets PASS (112/112: 62 lib unit + 50 integration across 8 suites: 11 actions_pipeline_test, 4 backup_guards_test, 1 cli_validate, 9 daemon_and_cli_test, 4 governance_and_docs_test, 6 hooks_pre_delete_test, 9 in_use_detection_test, 6 retention_age_size_count_test; doctests 0/0); cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90 PASS (93.09% lines across 8,678 lines with 600 missed; 90.85% regions); zero changes to Cargo.toml and Test-Path .\target = False.
  • GitHub Tracking: Issue #18 (fix/issue-18-ponytail-security-audit).

ACT-006 — Stabilize macOS FSEvents Sweep Count Assertion in daemon_notify_and_cooperative_stop_file_work_deterministically (Issue #16)

  • Timestamp: 2026-11-20T10:17:04Z
  • Issue / Branch: #16 (fix/issue-16-macos-fsevents-test)
  • Request: Stabilize the intermittent macOS FSEvents sweep count assertion in daemon::tests::daemon_notify_and_cooperative_stop_file_work_deterministically (src/daemon.rs:1418) spotted in post-merge main CI Run 44716793832 (sweeps_completed == 2 instead of 1 under debounce = 30ms and max_sweeps = Some(5)), and validate 5/5 passing checks on both PR and main post-merge push CI workflows.
  • Changes:
  • src/daemon.rs: Updated daemon_notify_and_cooperative_stop_file_work_deterministically line 1418 assertion from assert_eq!(final_state.sweeps_completed, 1); to assert!((1..=5).contains(&final_state.sweeps_completed)); with explanatory comment on macOS FSEvents asynchronous self-unlink delivery past the 30ms debounce window.
  • docs/RCA_REGISTER.md: Logged RCA-005 documenting the 5-Whys analysis of FSEvents delayed self-deletion delivery and the bounded sweep assertion fix.
  • docs/ACTION_LOGBOOK.md: Logged ACT-006.
  • Result:
  • Local WSL2 verification: cargo fmt --all -- --check PASS, cargo clippy --all-targets -- -D warnings PASS (0 warnings), cargo test PASS (57 unit + 38 integration across 8 suites = 95 passed; 0 failed), cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90 PASS (92.84% line coverage across 8,082 lines; daemon.rs 92.29%).
  • GitHub Tracking: Issue #16 (fix/issue-16-macos-fsevents-test).

ACT-005 — Add 9-Target Multi-OS GitHub Actions CI/Release Workflows, Bilingual End-User Documentation Suite, and Ship v1.0.0 (Issue #14)

  • Timestamp: 2026-11-20T10:34:10Z
  • Issue / Branch: #14 (ci/issue-14-multiarch-ci-bilingual-docs-v1)
  • Request: Author multi-OS GitHub Actions CI and 9-target release workflows (.github/workflows/ci.yml, .github/workflows/release.yml), synchronize the complete bilingual EN/FR documentation suite (README.md, README.fr.md, CHANGELOG.md, docs/en/{SPECIFICATIONS,USER_GUIDE,COOKBOOK_EXAMPLES}.md, docs/fr/{SPECIFICATIONS,GUIDE_UTILISATEUR,EXEMPLES_RECETTES}.md), verify 100% CI and governance checks, merge to main, and publish tagged GitHub Release v1.0.0.
  • Changes:
  • .github/workflows/ci.yml: Added 3-job CI workflow (fmt-and-clippy, coverage-gate enforcing cargo llvm-cov --fail-under-lines 90 + LCOV upload, and cross-os-test enforcing cargo clippy --all-targets -- -D warnings and cargo test --all-targets across ubuntu-latest, windows-latest, and macos-latest).
  • .github/workflows/release.yml: Added tag-triggered (v*) 9-target release matrix (x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl, aarch64-unknown-linux-gnu, aarch64-unknown-linux-musl, armv7-unknown-linux-gnueabihf via cargo-zigbuild, plus native x86_64-pc-windows-msvc, aarch64-pc-windows-msvc, aarch64-apple-darwin, and x86_64-apple-darwin) packaging binaries, README.md, README.fr.md, LICENSE, and SHA256SUMS.txt via softprops/action-gh-release@v3.
  • Cross-OS Portability Fixes (RCA-002, RCA-003, RCA-004): Updated src/actions.rs, src/in_use.rs, src/scanner.rs, src/daemon.rs, hook scripts (examples/hooks/verify_checksum_before_delete.sh, examples/hooks/archive_to_s3_mock.sh), and integration tests (tests/hooks_pre_delete_test.rs, tests/retention_age_size_count_test.rs, tests/in_use_detection_test.rs, tests/daemon_and_cli_test.rs) to resolve Windows clippy::needless_bool, macOS zombie & Windows kernel32 STILL_ACTIVE PID liveness checks, macOS /var -> /private/var TempDir canonicalization and shasum -a 256 fallback, macOS APFS st_birthtime clamping, Windows FILETIME SystemTime ceiling, /proc Linux gating, Windows atomic rename retry & share_mode(0) coverage, and zero #[cfg(not(unix))] warnings.
  • Bilingual Root & Changelog: Created README.md, README.fr.md, and CHANGELOG.md.
  • Bilingual Guides & Specifications: Created docs/en/USER_GUIDE.md, docs/fr/GUIDE_UTILISATEUR.md, docs/en/COOKBOOK_EXAMPLES.md, and docs/fr/EXEMPLES_RECETTES.md; synchronized docs/en/SPECIFICATIONS.md and docs/fr/SPECIFICATIONS.md (std::fs::FileTimes per IMP-004 and exact 9 release targets).
  • Governance: Updated docs/ACTION_LOGBOOK.md and docs/RCA_REGISTER.md (RCA-002, RCA-003, RCA-004).
  • Result:
  • Local verification & cross-target checks: cargo fmt --all -- --check PASS, cargo clippy --all-targets -- -D warnings PASS (0 warnings), cross-target cargo clippy --tests --lib --bins PASS (x86_64-pc-windows-gnu and aarch64-apple-darwin, 0 warnings), cargo test PASS (57 unit + 38 integration across 8 suites = 95 passed; 0 failed), cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90 PASS (92.84% line coverage across 8,082 lines), 0 LaTeX/Markdown integrity errors across all repository .md files.
  • GitHub Tracking: Issue #14 / PR #15 (ci/issue-14-multiarch-ci-bilingual-docs-v1).

ACT-004 — Implement Sweep Engine Orchestrator, Daemon Mode, Full CLI Subcommands, and Governance Test Suite (Issue #12)

  • Timestamp: 2026-11-20T10:22:44Z
  • Issue / Branch: #12 (feat/issue-12-engine-cli-daemon)
  • Request: Implement the Wave 3 sweep engine orchestrator (src/engine.rs), cross-platform daemon runner (src/daemon.rs), full clap v4 CLI (src/cli.rs, src/main.rs), end-to-end CLI/daemon tests (tests/daemon_and_cli_test.rs), and automated governance/LaTeX math integrity tests (tests/governance_and_docs_test.rs), removing [lints.cargo] unused-dependency suppressions from Cargo.toml.
  • Changes:
  • Cargo.toml & Cargo.lock: Removed [lints.cargo] unused_dependencies = "allow", removed deprecated filetime = "0.2" (replaced by std::fs::FileTimes in src/actions.rs, logged as IMP-004), and enabled ctrlc termination feature.
  • src/engine.rs: Added SweepEngine::run_config / run_live executing the strict 6-phase pipeline (Scan -> InUseProbe -> BackupGuard -> RetentionEval -> PreHook -> Execute), emitting all 8 AuditEventKind events, enforcing dry-run/plan parity, mid-sweep shutdown safety, and deterministic exit codes (0, 1, 3).
  • src/daemon.rs: Added DaemonRunner supporting Interval/Notify/Hybrid (notify::RecommendedWatcher + debounce), sweep_on_start, atomic .fc-tmp pid_file (live PID -> exit 4) & live JSON state_file (version: "1.0.0"), ctrlc (SIGINT/SIGTERM) + cooperative stop_file shutdown, --max-sweeps, daemon_status, daemon_stop, and generate_service_template (systemd, launchd, windows-task).
  • src/cli.rs & src/main.rs: Implemented full clap v4 CLI (--config, --dry-run, --json, -v, -q, --audit-log; run/clean, plan, check-in-use, validate, init, daemon {run, status, stop, service-template}) with documented exit codes (0, 1, 2, 3, 4, 10).
  • src/lib.rs: Exported cli, daemon, and engine modules alongside Wave 1/2 modules.
  • Integration Tests: tests/daemon_and_cli_test.rs (6 E2E tests) and tests/governance_and_docs_test.rs (3 governance/SVG/PNG/LaTeX syntax integrity tests).
  • Governance Registers: Updated docs/ACTION_LOGBOOK.md and docs/RCA_REGISTER.md (RCA-001, IMP-004).
  • Result:
  • cargo fmt --all -- --check: PASS (0 diffs).
  • cargo clippy --all-targets -- -D warnings: PASS (0 warnings).
  • cargo test: PASS (57 unit tests + 37 integration tests across 8 suites = 94 passed; 0 failed).
  • cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90: PASS (92.67%–92.68% line coverage across 8,075 lines: actions.rs 88.80%, audit.rs 95.73%, cli.rs 91.87%, config.rs 94.69%, daemon.rs 92.53%, engine.rs 97.39%, error.rs 100.00%, hooks.rs 94.22%, in_use.rs 87.56%, main.rs 100.00%, policy.rs 92.99%, scanner.rs 90.79%).
  • Independent Audit: Approved by @verifier (94/94 passed, 92.67% line coverage).
  • GitHub Tracking: Issue #12 / PR #13 (feat/issue-12-engine-cli-daemon).

ACT-003 — Implement Lifecycle Action Pipeline, Pure-Rust Compression, Pre-Delete Hooks, and JSONL Audit Log (Issue #8)

  • Timestamp: 2026-11-20T10:03:39Z
  • Issue / Branch: #8 (feat/issue-8-actions-compression-hooks)
  • Request: Implement the Wave 2 ordered lifecycle action pipeline (src/actions.rs), direct-argv pre-delete hook runner (src/hooks.rs), structured JSONL audit logging (src/audit.rs), validated configuration/hook examples (examples/), and integration test suites (tests/actions_pipeline_test.rs, tests/hooks_pre_delete_test.rs), merged cleanly with Wave 2 Core (Issue #7).
  • Changes:
  • src/hooks.rs: Added HookCandidate, HookVerdict, HookFailureDisposition, HookRunner, ProcessHookRunner, evaluate_hook, expand_hook_args, format_action_summary, and hook_error_disposition with direct Command::new argv invocation (zero shell), FILECLEANER_* env vars, concurrent stdout/stderr draining, try_wait() timeout + kill()/wait() reaping, ETXTBSY retry, skip_exit_code = 42 veto, and HookFailurePolicy::{AbortFile, AbortRule, WarnAndContinue}.
  • src/actions.rs: Added WorkingTarget, ActionReport, ActionExecutor::execute_pipeline, move_with_cross_fs_fallback, move_with_cross_fs_fallback_hook, copy_and_verify_sha256, execute_copy_truncate, compute_file_sha256, and verify_file_sha256 covering RenameByDate, pure-Rust Compress (Gzip, Lz4, Brotli, Zip), Move with .fc-tmp.<pid>.<seq> + sync_all() + SHA-256 cross-FS verification, CopyTruncate, collision-safe Trash, Delete, and zero-mutation DryRun parity.
  • src/audit.rs: Added AuditEventKind, AuditEntry, synchronous AuditLogger, RuleSummaryRow, SweepSummary, and format_bytes_human.
  • src/lib.rs: Merged Wave 2 Core & Actions exports cleanly across all 8 modules (actions, audit, config, error, hooks, in_use, policy, scanner).
  • Examples & Hooks: examples/postgres-backups.toml, examples/app-logs-rotation.toml, examples/incoming-spool.yaml, examples/hooks/archive_to_s3_mock.sh, examples/hooks/verify_checksum_before_delete.sh.
  • Integration Tests: tests/actions_pipeline_test.rs and tests/hooks_pre_delete_test.rs.
  • Governance: Updated docs/ACTION_LOGBOOK.md.
  • Result (Combined Wave 2 main + Issue #8):
  • cargo fmt --all -- --check: PASS (0 diffs).
  • cargo clippy --all-targets -- -D warnings: PASS (0 warnings).
  • cargo test: PASS (44 unit tests + 28 integration tests across 6 suites = 72 passed; 0 failed).
  • cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90: PASS (91.74% line coverage across 4,711 lines: actions.rs 88.69%, audit.rs 95.16%, config.rs 94.61%, error.rs 100.00%, hooks.rs 93.93%, in_use.rs 87.23%, main.rs 100.00%, policy.rs 92.38%, scanner.rs 90.79%).
  • Independent Audit: Approved by @verifier (38/38 standalone, 92.82% standalone) and verified post-merge (72/72, 91.74%).
  • GitHub Tracking: Issue #8 / PR #11 (feat/issue-8-actions-compression-hooks).

ACT-002 — Implement Directory Scanner, Multi-Probe In-Use Detector, and Backup-Guarded Retention Engine (Issue #7)

  • Timestamp: 2026-11-20T09:57:09Z
  • Issue / Branch: #7 (feat/issue-7-retention-safety-inuse)
  • Request: Implement the Wave 2 core scanning, 6-layer active-writer detection, and mathematical backup-guarded retention planner (src/scanner.rs, src/in_use.rs, src/policy.rs) with full unit and integration test suites (tests/retention_age_size_count_test.rs, tests/backup_guards_test.rs, tests/in_use_detection_test.rs).
  • Changes:
  • .gitignore: Added /.worktrees/ exclusion so isolated parallel agent worktrees stay untracked.
  • src/scanner.rs: Added Clock (SystemClock, FixedClock), ScannedFile, ScanReport, and Scanner::scan_rule enforcing non-symlink default traversal, .fc-tmp/control-file exclusion, glob/regex include/exclude precedence, byte-range bounds, fail-closed Created/FilenameDate timestamp resolution, and deterministic newest-first ordering.
  • src/in_use.rs: Added InUseReason, InUseReport, InUseBatchResult, injectable LockProbe + OsLockProbe (Unix flock, Linux /proc/*/fd inode scan with fail-closed EACCES diagnostics, Windows share_mode(0)), ProcFdProbeOutcome, InUseDetector::check_batch (with batched single-sleep two-point stability_window & future-mtime fail-closed min_idle_age), and check_single / check_single_with.
  • src/policy.rs: Added RuleOutcome (Ok, Frozen, Constrained), DecisionKind, CandidateDecision, SweepPlan, and RetentionEngine::plan implementing F_valid, staleness dead-man's-switch freezes, unconditional min_keep_files floor, busy-file exclusion, CombineMode::{Any, All}, and EvictionOrder::{OldestFirst, LargestFirst}.
  • src/lib.rs: Exported in_use, policy, and scanner modules with public re-exports.
  • Integration Tests: tests/retention_age_size_count_test.rs, tests/backup_guards_test.rs, and tests/in_use_detection_test.rs.
  • Governance Registers: Updated docs/ACTION_LOGBOOK.md and docs/RCA_REGISTER.md (IMP-003).
  • Result:
  • cargo fmt --all -- --check: PASS (0 diffs).
  • cargo clippy --all-targets -- -D warnings: PASS (0 warnings).
  • cargo test: PASS (32 unit tests + 16 integration tests = 48 passed; 0 failed).
  • cargo llvm-cov --all-targets --workspace --summary-only --fail-under-lines 90: PASS (92.00% line coverage across 3,112 lines: config.rs 94.61%, error.rs 100.00%, in_use.rs 87.23%, main.rs 100.00%, policy.rs 92.38%, scanner.rs 90.79%).
  • Independent Audit: Approved by @verifier.
  • GitHub Tracking: Issue #7 / PR #10 (feat/issue-7-retention-safety-inuse).

ACT-001 — Establish Governance, Bilingual Specifications, Brand Identity, and Cargo v1.0.0 Contract (Issue #1)

  • Timestamp: 2026-11-20T09:26:41Z
  • Issue / Branch: #1 (docs/issue-1-governance-specs-branding)
  • Request: Initialize the jmrenouard/FileCleaner repository with Apache-2.0 license, .gitignore/.gitattributes, SSH remote, MicroLLM-derived governance (AGENTS.md, .agents/rules/*, .github/dependabot.yml, docs/ACTION_LOGBOOK.md, docs/RCA_REGISTER.md), official brand identity assets (docs/assets/logo.svg, docs/assets/logo.png, docs/assets/header-banner.svg), formal bilingual specifications (docs/en/SPECIFICATIONS.md, docs/fr/SPECIFICATIONS.md), dev-team session transcript (docs/team-sessions/team-session-2026-11-20.md), and the initial compiling Rust v1.0.0 Cargo scaffold (Cargo.toml, src/error.rs, src/config.rs, src/lib.rs, src/main.rs, tests/cli_validate.rs).
  • Changes:
  • Repository Root & GitHub Foundation (root commit efac08c on main): .gitignore, .gitattributes, LICENSE (Apache-2.0, Copyright 2026 Jean-Marie Renouard / LightPath), public repo jmrenouard/FileCleaner over SSH (git@github.com:jmrenouard/FileCleaner.git).
  • Governance & Automation (English-Only): AGENTS.md, .agents/rules/github-workflow.md, .agents/rules/git-workflow.md, .agents/rules/project-governance.md, .agents/rules/language-policy.md, .agents/rules/latex-math-in-markdown.md, .github/dependabot.yml, docs/ACTION_LOGBOOK.md, docs/RCA_REGISTER.md (IMP-001, IMP-002, APP-001, IDEA-001..IDEA-004).
  • Brand Identity Assets: docs/assets/logo.svg, docs/assets/logo.png (512x512), docs/assets/header-banner.svg (1260x420).
  • Bilingual Formal Specifications & Team Alignment: docs/en/SPECIFICATIONS.md, docs/fr/SPECIFICATIONS.md (62/62 matched headings, 22/22 column-0 display math equations, zero \operatorname), docs/team-sessions/team-session-2026-11-20.md.
  • Rust v1.0.0 Cargo Scaffold & Tests: Cargo.toml, Cargo.lock, src/error.rs, src/config.rs, src/lib.rs, src/main.rs, tests/cli_validate.rs (pure-Rust dependencies verified via cargo tree; aligned schema covering Config, DaemonConfig/DaemonMode, AuditConfig, RuleConfig, TimeBasis, CombineMode, EvictionOrder, BackupGuardConfig, InUseConfig, HookConfig/HookFailurePolicy, ActionStep, CompressionFormat, parse_bytes, parse_duration_str, Config::from_file, and Config::validate).
  • Result:
  • cargo fmt --all -- --check: PASS (0 formatting diffs).
  • cargo clippy --all-targets -- -D warnings: PASS (0 warnings, 0 errors).
  • cargo test: PASS (13 unit tests in src/lib.rs + 1 integration test in tests/cli_validate.rs = 14 passed; 0 failed).
  • cargo llvm-cov --summary-only --fail-under-lines 90: PASS (94.80% line coverage across 1,269 lines: src/config.rs 94.61%, src/error.rs 100.00%, src/main.rs 100.00%).
  • Spec validation: All canonical TOML/YAML examples in docs/en/SPECIFICATIONS.md §2.6 verified with filecleaner validate (exit 0).
  • GitHub tracking: Issue #1 / PR #2 (docs/issue-1-governance-specs-branding).