Skip to content

Archive Injekt, the memory-injection subsystem gs-hook replaces - #83

Merged
rouges78 merged 3 commits into
mainfrom
archive-injekt
Aug 21, 2026
Merged

Archive Injekt, the memory-injection subsystem gs-hook replaces#83
rouges78 merged 3 commits into
mainfrom
archive-injekt

Conversation

@rouges78

Copy link
Copy Markdown
Owner

gs-hook is the injection path that ships and will be developed. Injekt was the earlier attempt at the same job, and it was never reachable — this removes it.

Why it was safe to remove

injekt-ui-enhanced.tsx had no importer. The three Injekt components imported only each other, so the whole 1706-line UI hung on one missing hook. The fourteen registered injekt::* commands had no caller either.

The backend explains why nobody ever wired it up. perform_hook wrote to 0x401000 — an address the code itself labels "indirizzo fittizio" — using NOP placeholders for the original bytes. This was scaffolding, not a feature that broke.

The chain it uncovered

Removing the UI orphaned more than itself:

Removed Was imported only by
translation-profile-manager.tsx (789) injekt-ui-enhanced
lib/game-profiles.ts (223) injekt-ui-enhanced
lib/game-translations.ts (829) injekt-ui-enhanced
lib/game-translation-profiles.ts (383) translation-profile-manager

Four modules that existed solely to serve something nothing reached. check-dead-modules surfaced each layer only after the one above it went, which is the case for running it between steps rather than once at the end.

The naming that hid it

The live "Universal Injector" in the sidebar calls inject_translation_hook, which — despite the name — creates a backup folder and patches files on disk. It never touches Injekt. Three separate systems wore the same word, which is most of why this sat unnoticed.

Deliberately not touched

translation_bridge. It shares nothing with Injekt — injekt.rs has zero references to shared_memory_ipc — and it is alive: it has a page, and all twelve of its commands have callers.

Deliberately kept

Branch claude/bold-banach. Its injekt.rs work dies with this PR, but it also carries ~1000 lines of shared_memory_ipc.rs fixes for the bridge that is still running: the circular-buffer wrap, the stats TOCTOU, and the unsafe impl Send/Sync that main still has at line 94. Those are a separate decision about a separate, live subsystem — five months of divergence, so it needs a real merge rather than a blind cherry-pick.

Also

Two tutorial steps pointed at /injekt-translator, a route route-config.ts already documented as gone. Removed. The two remaining injekt mentions in route-config.ts are comments documenting that the page does not exist, and are correct as they stand.

Verification

  • 6085 lines removed, one added.
  • Rust suite 1545 passed, cargo check clean.
  • tauri:check-cmds: 849 registered, no invoke pointing at nothing.
  • Typecheck clean, lint exit 0.
  • Both baselines follow the code down: dead-modules loses its resolved entry, i18n drops 803 → 802.

🤖 Generated with Claude Code

rouges78 and others added 3 commits August 21, 2026 01:36
Injekt was never reachable. Its 645-line UI had no importer, so the three
components held only each other, and the fourteen registered commands had
no caller. The backend explains why it was never wired: perform_hook wrote
to 0x401000, an address the code itself labels "indirizzo fittizio", with
NOP placeholders for the original bytes. It was scaffolding, not a broken
feature.

Removing it uncovered a chain. injekt-ui-enhanced was the only importer of
translation-profile-manager and game-profiles; those two were the only
importers of game-translations and game-translation-profiles. Four modules
existing solely to serve something nothing reached. The dead-module check
found each layer as the one above it went, which is the argument for
running it between steps rather than at the end.

The naming hid all of this. The live "Universal Injector" in the sidebar
calls inject_translation_hook, which despite the name patches files on
disk and never touches Injekt. Three separate systems wore the same word.

Not touched: translation_bridge. It shares nothing with Injekt — zero
references to shared_memory_ipc in injekt.rs — and it is alive, with a
page and twelve commands that all have callers.

Kept: claude/bold-banach. Its injekt.rs work dies with this commit, but it
also carries a thousand lines of shared_memory_ipc fixes for the bridge
that is still running: the circular-buffer wrap, the stats TOCTOU, and the
unsafe Send/Sync that main still has at line 94. That is a separate
decision, on a separate subsystem.

Also drops two tutorial steps pointing at /injekt-translator, a route
route-config.ts already documented as gone.

6085 lines out. Suite 1545 passed, typecheck clean, 849 commands with no
invoke pointing at nothing, both baselines follow the code down.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…oved

Two assertions encoded the /injekt-translator step that this branch
removed, so they failed the moment the tour stopped pointing at a route
route-config.ts already documented as gone: the dashboard tour is eight
steps now, and the page map has no entry for a path that does not exist.

The last-step check also read steps[8] by index. It now reads the last
element, because the assertion means "the tour ends with completion" and
should not break again the next time a step moves.

Caught by CI, not locally: I ran the gates this change obviously touched
and not the suite, which is the same mistake as the locale files this
morning. Full run now: 860 passed, and all eight steps of frontend-checks
green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
injekt-ui-enhanced.tsx carried one known div-onclick violation. Deleting
the file resolved it, and the guard rejects a baseline that still lists a
fixed entry — the same rule that caught the dead-module baseline, working
as intended.

That makes three baselines this branch moves: dead modules, i18n, and now
a11y. Each one is a file that records what is wrong today so tomorrow
cannot get worse, and each has to follow the code when the code improves.

Found by reading the workflow rather than trusting my list of gates. I had
run eight steps of frontend-checks and there are eleven: deps:check and
a11y:check were never in my head, and a11y is the one that failed. All
eleven are green now, including 860 tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@rouges78
rouges78 merged commit da98ca3 into main Aug 21, 2026
7 checks passed
@rouges78
rouges78 deleted the archive-injekt branch August 21, 2026 00:04
rouges78 added a commit that referenced this pull request Aug 21, 2026
…is worth finishing (#84)

Five commits stranded on claude/bold-banach after PR #19 took the first
half of that branch. This recovers the parts that survive Injekt's
archival (#83), and measures the question the recovery raised.

Dictionary engine: single hash-indexed storage (no count drift), 500k
entry cap, CSV parser honouring quoted fields, batch lookup, mtime hot
reload, save/load of a dictionary dir.

Shared memory: Response Data becomes a real circular buffer with a
client-advanced tail (full buffer -> slot Error, never overwrite unread
replies); Shmem moves behind Arc<SharedShmem> co-owned by the server
thread, replacing the unsound Send/Sync; header counters written once
per batch, removing the RMW race. PROTOCOL_VERSION bumped to 2 for the
new header field.

AI fallback: cache misses feed an mpsc queue drained by
translation_bridge_drain_misses — the Windows half and main.rs
registration of a command whose Linux stub already shipped orphaned.

Measured both transports (cargo test --release --lib ipc_bench):
Named Pipe p50 9.2us / p95 18.9us, shared memory p50 0.4us / p95 0.5us.
~20x apart, and irrelevant: the DLL caches locally and only does IPC on
first sight of a string. Recorded in docs/METODI-DI-TRADUZIONE.md along
with the finding that no request/response IPC path is complete on both
sides, and that the two similar pipe names are two separate channels,
not a mismatch.

Verified: cargo check/test (22 passed, 2 new), clippy, tsc, eslint,
i18n:check, tauri:check-cmds, dead:check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant