Skip to content

Correct module cache hashing docs - #3869

Open
thomhurst wants to merge 2 commits into
mainfrom
issue-3806-cache-docs
Open

Correct module cache hashing docs#3869
thomhurst wants to merge 2 commits into
mainfrom
issue-3806-cache-docs

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Closes #3806.

Corrects the module-caching guide to describe actual behavior: input files are content-hashed on every fingerprint calculation, with concurrency bounded by MaximumHashConcurrency.

Validation: git diff --check

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code review

Reviewed this doc-only change against the actual implementation.

Verified accurate: The updated wording ("Input files are content-hashed concurrently on every fingerprint calculation, up to MaximumHashConcurrency files at a time") matches ModuleCacheFileHasher.HashAsync (src/ModularPipelines/Caching/ModuleCacheFileHasher.cs), which always SHA-256 hashes file contents via Parallel.ForEachAsync with MaxDegreeOfParallelism = _maximumConcurrency, and is called directly from ModuleCacheResultRepository on each fingerprint calculation. No separate mtime/size-based cache exists to short-circuit hashing, so the old wording ("persistent modification-time and size index; changed files are hashed concurrently") was indeed inaccurate — the fix is correct.

No issues found. This is a minimal, well-scoped documentation correction with no code changes, so there are no architectural or design concerns to raise here.

@thomhurst

Copy link
Copy Markdown
Owner Author

CI diagnosis: the docs deployment and review pass. Ubuntu/Windows/macOS .NET jobs fail only on current-main RunReportTests.cs:1483-1484 CS0117 references to removed flat console options. Focused baseline fix #3864 is running; this PR changes one documentation sentence. No rerun before main is repaired.

@thomhurst

Copy link
Copy Markdown
Owner Author

Shared RunReportTests failure is fixed on current main by merged PR #3844. Refreshed this branch onto current main for a clean CI cycle; no duplicate patch or stale-run rerun.

@thomhurst
thomhurst force-pushed the issue-3806-cache-docs branch from 7179f6a to 1b94c42 Compare August 5, 2026 01:32
@thomhurst

Copy link
Copy Markdown
Owner Author

@codex review

@thomhurst

Copy link
Copy Markdown
Owner Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Re-reviewed after the rebase onto current main (no diff content changed since the prior review — still the single-sentence correction in docs/docs/how-to/module-caching.md).

Verified accurate against current main: pulled src/ModularPipelines/Caching/ModuleCacheFileHasher.cs directly from main and confirmed HashAsync always SHA-256 hashes file contents via Parallel.ForEachAsync with MaxDegreeOfParallelism = _maximumConcurrency (bound by MaximumHashConcurrency, matching the option name used in the doc's config sample). There's no persistent mtime/size index that short-circuits hashing — the before/after FileInfo comparison in that method is a race-guard that re-hashes if the file changed mid-read, not a skip-hash cache. So the old wording ("persistent modification-time and size index; changed files are hashed concurrently") was inaccurate, and the new wording ("Input files are content-hashed concurrently on every fingerprint calculation, up to MaximumHashConcurrency files at a time") correctly describes the implementation.

No issues found. This is a minimal, correctly-scoped documentation fix with no code changes — nothing architectural to flag here.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 1b94c42f2c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@thomhurst

Copy link
Copy Markdown
Owner Author

CI diagnosis: the docs-only diff cannot affect the core test host. The Ubuntu RunCoreUnitTests process exited abruptly with code 134 after ~2 minutes, with no failed-test summary and no hang dump; all other current-head checks and reviews pass. Triggered the single allowed failed-job rerun for this infrastructure/test-host crash.

@thomhurst

Copy link
Copy Markdown
Owner Author

Correction: GitHub reported the workflow rerun was already running, so this agent did not create a duplicate rerun.

@thomhurst

Copy link
Copy Markdown
Owner Author

Refreshed docs-only branch onto current main in c1b8ac0 after the one allowed CI rerun also hit the core-test host failure. Validation: git diff --check clean; PR delta remains only docs/docs/how-to/module-caching.md.

@claude

claude Bot commented Aug 5, 2026

Copy link
Copy Markdown

Code review

Re-checked after the latest rebase onto main (commit c1b8ac0) — the PR diff is still just the single-sentence correction in docs/docs/how-to/module-caching.md, unchanged from the version already reviewed twice above.

Re-verified against current main: ModuleCacheFileHasher.HashAsync (src/ModularPipelines/Caching/ModuleCacheFileHasher.cs) unconditionally SHA-256-hashes each input file's contents via Parallel.ForEachAsync bounded by MaxDegreeOfParallelism = _maximumConcurrency (sourced from MaximumHashConcurrency), on every call — the before/after FileInfo snapshot is a race guard for files that mutate mid-hash, not a persistent mtime/size cache. The new doc wording ("Input files are content-hashed concurrently on every fingerprint calculation, up to MaximumHashConcurrency files at a time") is accurate; the old wording it replaces was not.

No issues found. Minimal, correctly-scoped documentation fix — nothing architectural to flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Caching: module-caching.md claims a persistent mtime/size hash index that does not exist (docs bug + real perf opportunity)

1 participant