1. Introduction: The Failure Modes of Lexical Search
When an AI coding agent refactors an enterprise backend API, it must answer: “If I rename or delete this backend endpoint or field, what client call sites break?” In current practice, agents invoke lexical search tools (grep, ripgrep). Across an empirical benchmark of 20 production REST APIs in the ThingsBoard enterprise repository (a multi-million line Java backend + Angular frontend), lexical search demonstrated severe architectural failure modes:
1. Blindness to Inheritance
Controllers inherit endpoints from generic CRUD bases (e.g. DeviceController extends BaseCrudController<Device, UUID>). Grep searching DeviceController.java returns 0 matches, falsely certifying that an endpoint is dead.
2. Wire-Envelope Obfuscation
Frameworks wrap DTOs in reactive envelopes: ResponseEntity<Mono<Page<TbResourceInfo>>>. Grep cannot unwrap transparent containers, misinterpreting envelopes as structural data.
3. The Common Symbol Catastrophe
Modifying common words like .name floods the context window with 46,025 tokens (1,097 matched lines), triggering "Lost in the Middle" attention degradation and hallucinated repair loops.
4. Serialization Alias Invisibility
Renaming a field while preserving @JsonProperty("alias") triggers false breaking changes, while deleting @JsonProperty goes completely undetected by text search.
2. Closed-Loop Obligation Conservation
Sajimora™ models distributed cross-language verification as a closed-loop obligation conservation problem over an algebraic lattice. Let a path expression \(P\) be a sequence of segment atoms \(S_1 / S_2 / \dots / S_k\). The set of segment atoms forms a partial order \((\mathcal{S}, \sqsubseteq)\) ordered by matching specificity:
Let \(\mathcal{O}_{\text{net}}\) be the net unresolved contract obligations in a codebase. A build passes compilation if and only if \(\mathcal{O}_{\text{net}} = 0\). Any link where verification is inconclusive forces an immediate fail-closed build halt unless an immutable cryptographic exception hash exists in .sajimora/exceptions.sig.
3. Evidence-Grounded AI Architecture
A foundational architectural invariant is that AI is authorized to discover and propose candidate evidence; only deterministic Rust mathematics is authorized to certify verdicts.
• Single parallel forward pass: 3ms–5ms on standard consumer CPU
• Extracts candidate path and parameter provenance without sequential generation
• Validates configuration provenance and dependency call graphs
• Certifies: COMPATIBLE | BREAKING | UNKNOWN (Admissible Evidence Only)
4. Empirical Verification: 20 Selected DTO/Field Cases (ThingsBoard)
Empirical measurements conducted on 20 selected DTO and field refactoring cases from the ThingsBoard repository via native Rust instrumentation (measure_exact_tokens.rs):
| # | Target DTO & Refactored Field | Grep Ingestion | Grep Lines | Sajimora Tokens | Call Sites | Token Reduction |
|---|---|---|---|---|---|---|
| 1 | RuleChain.name | 46,025 tokens | 1,097 | 464 tokens | 8 sites | -98.99% |
| 2 | TbResourceInfo.customerId | 10,933 tokens | 287 | 353 tokens | 5 sites | -96.77% |
| 3 | AgentApplication.agentId | 1,218 tokens | 34 | 372 tokens | 5 sites | -69.45% |
| 4 | JwtPair.token | 3,114 tokens | 66 | 192 tokens | 0 sites | -93.83% |
| 5 | Alarm.customerId | 10,933 tokens | 287 | 259 tokens | 2 sites | -97.63% |
| 6 | Device.customerId | 10,933 tokens | 287 | 291 tokens | 3 sites | -97.33% |
| 7 | OtaPackageInfo.deviceProfileId | 2,035 tokens | 53 | 251 tokens | 1 site | -87.66% |
| 8 | AgentAppProfile.name | 46,025 tokens | 1,097 | 338 tokens | 4 sites | -99.26% |
| 9 | Edge.customerId | 10,933 tokens | 287 | 366 tokens | 5 sites | -96.65% |
| 10 | Integration.configuration | 24,550 tokens | 523 | 312 tokens | 3 sites | -98.72% |
| 11 | Job.customerId | 10,933 tokens | 287 | 322 tokens | 3 sites | -97.05% |
| 12 | Queue.name | 46,025 tokens | 1,097 | 187 tokens | 0 sites | -99.59% |
| 13 | WhiteLabelingParams.logoImageUrl | 268 tokens | 9 | 396 tokens | 5 sites | Grep missed 5 sites! |
| 14 | DeviceProfile.name | 46,025 tokens | 1,097 | 302 tokens | 3 sites | -99.34% |
| 15 | EntityInfo.name | 46,025 tokens | 1,097 | 189 tokens | 0 sites | -99.58% |
| 16 | EntityView.entityId | 13,989 tokens | 378 | 266 tokens | 2 sites | -98.09% |
| 17 | HomeDashboardInfo.dashboardId | 2,382 tokens | 62 | 281 tokens | 2 sites | -88.20% |
| 18 | TenantProfile.name | 46,025 tokens | 1,097 | 302 tokens | 3 sites | -99.34% |
| 19 | AiModel.version | 12,436 tokens | 321 | 260 tokens | 2 sites | -97.90% |
| 20 | Asset.customerId | 10,933 tokens | 287 | 259 tokens | 2 sites | -97.63% |
| TOTAL | 20 Selected DTO/Field Cases | 445,785 tokens | 8,477 | 5,963 tokens | 58 sites | -98.66% OVERALL |
5. Defensive Technical Disclosure and Intellectual Property Notice
5.1 Purpose of publication: This document publicly discloses selected technical methods, architectural concepts, and implementation approaches developed in connection with the Sajimora™ project. It is intended to establish a verifiable public disclosure of the technical subject matter expressly described herein for consideration as prior art.
5.2 Scope: The disclosed subject matter includes: (1) closed-loop obligation conservation and algebraic path-lattice verification across polyglot boundaries; (2) separation of probabilistic AI-generated candidate evidence from deterministic static verification and verdict certification; and (3) the concrete CST algorithms, mathematical representations, data structures, and empirical measurements described in Sections 2, 3, and 4. The scope is strictly limited to what is sufficiently described herein and does not extend to undisclosed inventions, proprietary systems language architectures, runtime memory models, or future developments of Sajimora™.
5.3 Defensive prior-art intent: This publication is intended to make the disclosed technical subject matter publicly available for consideration as prior art under applicable patent laws, including 35 U.S.C. § 102 and Article 54 of the European Patent Convention. Whether it affects a particular patent claim depends on the applicable jurisdiction, actual public release date, accessibility, and sufficiency of the disclosure. No guarantee is made that any subsequent patent application or claim will be rejected.
5.4 Copyright: Copyright in the original text, diagrams, illustrations, and other copyrightable material in this document remains with its respective copyright owner, except where a separate licence expressly provides otherwise.
5.5 Software and trademarks: This publication does not, by itself, grant a licence to Sajimora software, source code, or other materials outside this document. Software licensing is governed by the applicable software licence. Rights in the Sajimora™ name, logos, and branding are addressed separately under applicable trademark laws. Use of the name “Sajimora™” in this document does not itself establish trademark registration.
5.6 Publication record: Project: Sajimora™ • Document: Technical Whitepaper — Defensive Publication • Version: 1.1 • Publication date: 1 November 2026 • Canonical location: https://sajimora.com/whitepaper.html • Publisher: The Sajimora™ Architecture & Research Group • Contact: admin@sajimora.com • Document SHA-256 Digest: 9c6a57e9446bf203712dd6f0f2e1c3ce0fb636a4316d6d5de6f387da00f01656.
Important: This notice is a publication statement, not a legal opinion or a substitute for advice from a patent professional. Public disclosure may affect patent rights differently across jurisdictions. Obtain jurisdiction-specific advice before relying on any grace period or filing strategy.