Repository navigation
Description
Summary
The herdr wildcard re-export issue raised as part of the v0.88.0 sync follow-up is
already fully closed by commit aa955589d. This issue records that verification so the
item is not re-raised, and documents one genuine residual gap found while verifying it.
Verification of aa955589d
aa955589d ("fix(herdr): replace wildcard re-export with explicit list") changed
src/herdr.rs by 1 insertion / 1 deletion. Current state of the file:
pub use jcode_tui::herdr::{init, init_forced, is_active, on_session_start, shutdown};Checks run at 38af5e024 (identically satisfied at 94db64687):
| Check | Command | Result |
|---|---|---|
| No wildcard re-export | rg -n 'pub use .*::\*' src/herdr.rs |
no matches |
No any-::* at all |
rg -c '::\*' src/herdr.rs |
0 |
| Wildcard gate | python3 scripts/check_wildcard_reexport_budget.py |
passed (total=17), exit 0 |
src/herdr.rs is clean. Nothing remains to do on this file.
The genuine residual gap
The wildcard gate is a global count, not a per-file assertion. Its budget file:
{
"total": 17,
"files": {
"crates/jcode-app-core/src/lib.rs": 1,
"crates/jcode-app-core/src/setup_hints.rs": 1,
"crates/jcode-base/src/env.rs": 1,
"crates/jcode-base/src/id.rs": 1,
"crates/jcode-base/src/lib.rs": 1,
"crates/jcode-base/src/logging.rs": 1,
"crates/jcode-base/src/memory_types.rs": 1,
"crates/jcode-base/src/plan.rs": 1,
"crates/jcode-base/src/protocol.rs": 1,
"crates/jcode-base/src/provider_catalog.rs": 1,
"crates/jcode-base/src/stdin_detect.rs": 1,
"crates/jcode-base/src/storage.rs": 1,
"crates/jcode-base/src/transport/mod.rs": 1,
"crates/jcode-base/src/util.rs": 1,
"crates/jcode-tui/src/lib.rs": 1,
"crates/jcode-tui/src/tui/mod.rs": 1,
"src/lib.rs": 1
}
}Each of the 17 tracked files carries exactly 1 wildcard, and the check passes as long as
the total stays ≤ 17. Two consequences:
- The count can grow without the gate failing, as long as it stays within budget. A new
file with one wildcard is silently acceptable. - Removing wildcards from a tracked file does not earn any credit — the budget is a
ceiling, not a target, so there is no incentive to drive the number down.
This is why a partial fix to herdr.rs would have been invisible: the gate would have stayed
green either way. The gate measures magnitude, not presence.
Proposed fix
Add a per-file assertion mode to scripts/check_wildcard_reexport_budget.py so that
maintainers can declare files that must have zero wildcard re-exports, independent of the
global ceiling:
{
"total": 17,
"must_be_clean": [
"src/herdr.rs"
],
"files": { ... }
}and fail the gate if any listed file contains a wildcard, regardless of the global total.
Optionally, report the number of wildcard sites per file in the gate's output rather than
only the aggregate, so a new site in an untracked file is visible in CI logs even when the
ceiling is not breached.
Scope
- In scope:
scripts/check_wildcard_reexport_budget.py(addmust_be_cleansupport and/or
per-file reporting), andscripts/wildcard_reexport_budget.json(the new key). - Out of scope: changing any of the 17 existing wildcard sites. They are tracked,
acknowledged, and not regressions.src/herdr.rsneeds no change — it is already clean.
Acceptance criteria
-
scripts/check_wildcard_reexport_budget.pyfails if a file listed inmust_be_clean
contains a wildcard re-export, even when the global total is ≤ 17. - The gate's output lists wildcard count per file, so a site in a previously-untracked
file is visible. - The gate still exits 0 at the current state (
total=17, no wildcard in
src/herdr.rs).
Effort
Estimated 1-2 hours. Needs write access to scripts/ only.
Provenance
- Raised from
feature/upstream-0.88-syncat38af5e024(KooshaPari/KCode);
verification checks run at94db64687. - Original fix:
aa955589d("fix(herdr): replace wildcard re-export with explicit list"). - Gate:
scripts/check_wildcard_reexport_budget.py(total=17, exit 0 at94db64687). - Detailed session analysis:
docs/sessions/20260924-upstream-0.88-sync/05_KNOWN_ISSUES.md.
tx-task: #24
tx-scope: ci
tx-agent: jcode
Activity
[-]herdr_reexport_followup[/-][+]herdr: verify the explicit re-export list in src/herdr.rs stays stable across upstream re-merges[/+]docs(session): round 9 — PR #23 close-as-superseded hidden cost (2003…
docs(session): round 10 — operator decision dossier (7 decisions prof…