Archive Injekt, the memory-injection subsystem gs-hook replaces - #83
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsxhad no importer. The three Injekt components imported only each other, so the whole 1706-line UI hung on one missing hook. The fourteen registeredinjekt::*commands had no caller either.The backend explains why nobody ever wired it up.
perform_hookwrote to0x401000— 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:
translation-profile-manager.tsx(789)injekt-ui-enhancedlib/game-profiles.ts(223)injekt-ui-enhancedlib/game-translations.ts(829)injekt-ui-enhancedlib/game-translation-profiles.ts(383)translation-profile-managerFour modules that existed solely to serve something nothing reached.
check-dead-modulessurfaced 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.rshas zero references toshared_memory_ipc— and it is alive: it has a page, and all twelve of its commands have callers.Deliberately kept
Branch
claude/bold-banach. Itsinjekt.rswork dies with this PR, but it also carries ~1000 lines ofshared_memory_ipc.rsfixes for the bridge that is still running: the circular-buffer wrap, the stats TOCTOU, and theunsafe impl Send/Syncthatmainstill 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 routeroute-config.tsalready documented as gone. Removed. The two remaininginjektmentions inroute-config.tsare comments documenting that the page does not exist, and are correct as they stand.Verification
cargo checkclean.tauri:check-cmds: 849 registered, no invoke pointing at nothing.🤖 Generated with Claude Code