Nested `std::` calls such as `std::ranges::move` still bind unrelated in-repo definitions
- Dominant language
- C++
- Stars
- 2.1k
- Forks
- 125
- Avg merge
- 5h 42m
- Merged PRs (30d)
- 136
Description
## What is wrong
PR #134 stopped `std::move( x )` from binding a lone in-repo `move`, but its guard reads only the
call's *immediate* qualifier. Nested standard-library calls — `std::ranges::move`,
`std::chrono::duration_cast` — therefore still bind unrelated in-repo definitions, at full
confidence. It gets worse when a library mirrors std's layout: `std::chrono::duration_cast` then
hits a vendored `chrono::duration_cast` at the canonical tier, which the guard exempts by design.
Every C++20/23 codebase uses these namespaces, and every `--callers`, `--impact` and ranking over
them inherits the false edges.
## The evidence
Measured on this repository: an uncommitted copy of the kit's fixture under `test/` made ripwire's
own `now_ticks` and `wallClockNs` "call" a test decoy.
`test/stdqualcheck.sh` §11 pins the gap with 15 checks, on a corpus written into a temporary
directory at run time (a committed decoy was measured capturing ripwire's own callers, which is why
the fixture is generated):
- **KNOWN GAP K1:** `std::ranges::move` binds the lone `Pool::move` (census `unique`).
- **KNOWN GAP K2:** `std::chrono::duration_cast` binds a user `vendorlib::chrono::duration_cast` at
the canonical tier (census `qualified`).
- **KNOWN GAP K3:** `std::terminate()` binds a declaration-only
`namespace std { void terminate() noexcept; }` (census `unique`).
- **KNOWN GAP header:** `edges=6` and no `external=`. Once fixed it reads `edges=3 external=3`.
- **Controls** any fix must keep: a true member call `pool.move()`, a true
`vendorlib::chrono::duration_cast` call, and a definition inside `std::ranges`.
The whole gate is 50 PASS / 0 FAIL, the seven KNOWN GAP lines among them. The KNOWN GAP arms pass
because they pin the *wrong* answers; flipping them to the corrected literals their PASS messages
name is the finish line.
## Size
**Medium.** One extraction fact on references and definitions; a guard extension in `src/graph.h`; a
parser version bump, plus a cache version bump and a schema re-pin if a field is added; the
red-first gate arms; and one corpus measurement. Version numbers need coordinating with any other
open change that bumps the same constants. ObjC++ is an optional follow-on — §7's ObjC++ FLOOR arm
is already labelled as that optional known gap.
## Where to start
`prompts/help-wanted/cpp-nested-std-namespaces.md` is a self-contained prompt for a coding agent. It
carries the evidence, the file pointers, a reproduction, the design space and constraints, the
acceptance criteria, the traps, and what the fix PR must contain. Like every prompt in `prompts/`,
**it ends by writing a plan and stopping** — a maintainer agrees the plan before any code is
written. No prior knowledge of ripwire internals is needed; the prompt points at every file.
Comment here to claim it.
Contributor guide
Research direction
Start with prompts/help-wanted/cpp-nested-std-namespaces.md, which provides the reproduction, file pointers, design constraints, and acceptance criteria. Read the guard extension area in src/graph.h, then run test/stdqualcheck.sh §11 to see the failing nested-namespace cases. Done means the corrected literals pass while the member, vendor, and std::ranges controls remain valid, with required version updates coordinated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100