Skip to content

fix(pace-cc): refuse what the key cannot see; dispatch reads the language and depfile rule as the driver does - #1766

Merged
Yaraslaut merged 3 commits into
fix/windows-dispatch-and-verifyfrom
fix/cache-key-inputs
Nov 14, 2026
Merged

Yaraslaut merged 3 commits into
fix/windows-dispatch-and-verifyfrom
fix/cache-key-inputs

Conversation

@Yaraslaut

Copy link
Copy Markdown
Member

Stacked on #1764 (and so on #1763). The base is #1764's branch, so this PR shows only its own commit. Merge those first.

Summary

Nine audit findings (2026-10-17) from one class: the cache served or stored an object that something outside the key had changed. Each premise was checked against the current tree before it was fixed.

Issue What the key could not see Fix
#1688 -march/-mcpu/-mtune=native: this machine's CPU Not cached
#1692 Profiles, plugins, specs files, -B Not cached
#1689 A depfile from -MD/-MMD without -MF, or through -Wp,-MD Not cached: a hit cannot reproduce a depfile the launcher cannot name
#1691 Side files: -gsplit-dwarf, --coverage, -ftest-coverage, -ftime-trace, -fstack-usage, -save-temps Added to SideArtefacts
#1700 A <header>.gch gcc reads in place of the header Not cached when one exists beside a reported header or an -include
#1698 A driver whose version probe failed, keyed on its bare name IdentityEvidence::NameOnly; not cached
#1695 __DATE__/__TIME__ used from a header No manifest is recorded over such a header
#1697 A -x after the source (gcc ignores it), read by dispatch anyway Dispatch reads only selectors before the source
#1696 -MT/-MQ/-MP in a dispatched compile's depfile DepFileRulesOf and a multi-target RenderDepFile with phony rules

The refusals are one table, UncacheableFlags. Each row carries the reason the launcher prints under PACE_VERBOSE. Refusing rather than hashing is deliberate: native cannot be known from the command line, and hashing a profile or plugin on every compile costs more than the refusal, which is one local compile.

Testing

  • pace-cc-tests: 1165 cases pass. Each refusal has a control that must stay cacheable: -march=x86-64-v3, -g, CMake's -MD -MT -MF, and a leading -x.
  • Docs (docs/tools/pace-cc.md, known limitations) and the compile-cache rulebook are updated.

Closes #1688
Closes #1689
Closes #1691
Closes #1692
Closes #1695
Closes #1696
Closes #1697
Closes #1698
Closes #1700

🤖 Generated with Claude Code

…uage and depfile rule as the driver does

- Flags naming something the key does not hash are refused by table (UncacheableFlags,
  each row carrying the reason the launcher prints): -march/-mcpu/-mtune=native (#1688),
  profiles, plugins, specs files and -B (#1692), and a depfile requested through -Wp,-MD or
  by -MD/-MMD without -MF, which a hit cannot reproduce (#1689).
- -gsplit-dwarf, --coverage, -ftest-coverage, -ftime-trace, -fstack-usage and -save-temps
  write a file beside the object and join SideArtefacts (#1691).
- A <header>.gch gcc would read in place of a header is looked for after the key's
  preprocess, and such a compile is not cached (#1700).
- A driver whose identity probe answered nothing is keyed on its file name, which every
  version shares; DriverIdentityProbe now says so (IdentityEvidence) and the launcher
  refuses (#1698).
- A manifest over a header expanding __DATE__/__TIME__/__TIMESTAMP__ is not recorded (#1695).
- Dispatch takes a GNU driver's language only from selectors before the source (#1697),
  and writes a dispatched depfile with the build's -MT/-MQ targets and -MP phony rules
  (#1696).

Closes #1688
Closes #1689
Closes #1691
Closes #1692
Closes #1695
Closes #1696
Closes #1697
Closes #1698
Closes #1700

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Yaraslaut Yaraslaut added type/bug Behaves incorrectly against its stated contract area/compile-cache CompileCache/, the 0xFC wire, the executor, PathCanon area/launcher apps/fastcache-cc/ - the compiler launcher and its cache key area/distributed Distributed/, apps/fastcache-compile-node/ - dispatch, workers, scheduler labels Nov 12, 2026
@github-actions github-actions Bot removed area/compile-cache CompileCache/, the 0xFC wire, the executor, PathCanon area/distributed Distributed/, apps/fastcache-compile-node/ - dispatch, workers, scheduler labels Nov 12, 2026
…d clang-tidy wants as a pointer

Catch2 reads a case name that opens with '-' as an option, so the -MD case
failed to run and test-name-hygiene refused it; it now opens with 'A'.
UncacheableFlagReason's find_if result is a pointer on libstdc++, which
readability-qualified-auto rejects; core::findIfOrNull answers the same
question without naming an iterator.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01No1NzphJd7AnqGSY9ZLBbS
Signed-off-by: Yaraslau Tamashevich <yaraslau.tamashevich@gmail.com>
@Yaraslaut
Yaraslaut merged commit 28b0d1f into fix/windows-dispatch-and-verify Nov 14, 2026
28 of 33 checks passed
@Yaraslaut
Yaraslaut deleted the fix/cache-key-inputs branch November 14, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/launcher apps/fastcache-cc/ - the compiler launcher and its cache key type/bug Behaves incorrectly against its stated contract

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant