[PR #3224] [CLOSED] fix(reference-source): recognize Kotlin source files #5654

Closed
opened 2026-10-31 01:08:17 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3224
Author: @Aurantium-47
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: codex/rea-kotlin-reference-source


📝 Commits (1)

  • c7db6b8 fix(reference-source): recognize Kotlin source files

📊 Changes

2 files changed (+64 additions, -0 deletions)

View changed files

➕ src/application/ReferenceSourceImportEntries.test.ts (+60 -0)
📝 src/domain/referenceSourceClassification.ts (+4 -0)

📄 Description

Summary

Recognize .kt and .kts as Kotlin source in historical source inventories. A root-level MainActivity.kt or Kotlin script currently appears as unknown with a null language, so Kotlin is also absent from the inventory's language summary.

Problem and expected behavior

Importing a Kotlin source tree should retain Kotlin as its language, just as the existing inventory does for Java and Swift. Directory names such as src currently provide a source classification for some Kotlin files, but their language is still lost. This omission was found while checking the source classifier; there is no linked issue.

Change and scope

Add the two suffixes to the existing source-extension and language tables. The owner remains referenceSourceClassification.ts; import entries and language summaries use its result. This is metadata recognition only, with no Kotlin parsing or dependency extraction.

Contract and boundary impact

  • Semantic owner and earliest changed stage: reference-source path classification and language detection.
  • Contribution scope fit and linked maintainer decision: routine metadata correction in existing read-only source import; no advance decision required.
  • CLI and MCP/tool-catalog contract: no schema, operation or argument changes; imported Kotlin files now report language: "Kotlin" and the source classification.
  • Provider, bridge, target-format, or platform compatibility: no provider or bridge changes; filename recognition is platform-independent.
  • Evidence, artifact, provenance, or reconstruction contract: input bytes are unchanged; original paths, sizes and hashes are preserved. Derived inventory commitments can change because corrected metadata is included.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged.
  • Generated metadata, package or installation impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

The new production-projection test supplies Kotlin class/script and Gradle Kotlin reader observations, with Java and .kt.backup controls. It verifies classifications, the derived language index, retained path/size/hash evidence, and the absence of invented Kotlin import relationships or parser failures. The same probe fails before the four-line fix and passes afterward.

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • node scripts/run-development-tests.mjs local src/application/ReferenceSourceImportEntries.test.ts — 1 test passed with pinned Node 24.18.0 (the test:local entry point).
  • node scripts/verify-test-discovery.mjs — all 1244 test files discovered exactly once.
  • oxfmt --check src/domain/referenceSourceClassification.ts src/application/ReferenceSourceImportEntries.test.ts — passed.
  • npm run check — passed in the isolated Kotlin branch: typecheck, runtime build, lint, format, unused-code and metadata checks, module boundaries and architecture guards. Lint reports no errors; existing repository warnings remain.

The regression exercises the production projection from reader observations. The complete filesystem import was not run on this Windows host, where the existing importer requires unavailable O_NOFOLLOW support. No Kotlin execution or real-provider claim is made.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; .kt.backup and existing non-Kotlin language detection are unchanged.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable to filename metadata recognition.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no new authority or side effects.

AI assistance was used to investigate, implement and check this change.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/3224 **Author:** [@Aurantium-47](https://github.com/Aurantium-47) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/rea-kotlin-reference-source` --- ### 📝 Commits (1) - [`c7db6b8`](https://github.com/morluto/rea/commit/c7db6b87f327dec62ab5f231fdbd7d621b9022c2) fix(reference-source): recognize Kotlin source files ### 📊 Changes **2 files changed** (+64 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `src/application/ReferenceSourceImportEntries.test.ts` (+60 -0) 📝 `src/domain/referenceSourceClassification.ts` (+4 -0) </details> ### 📄 Description ## Summary Recognize `.kt` and `.kts` as Kotlin source in historical source inventories. A root-level `MainActivity.kt` or Kotlin script currently appears as unknown with a null language, so Kotlin is also absent from the inventory's language summary. ## Problem and expected behavior Importing a Kotlin source tree should retain Kotlin as its language, just as the existing inventory does for Java and Swift. Directory names such as `src` currently provide a source classification for some Kotlin files, but their language is still lost. This omission was found while checking the source classifier; there is no linked issue. ## Change and scope Add the two suffixes to the existing source-extension and language tables. The owner remains `referenceSourceClassification.ts`; import entries and language summaries use its result. This is metadata recognition only, with no Kotlin parsing or dependency extraction. ## Contract and boundary impact - Semantic owner and earliest changed stage: reference-source path classification and language detection. - Contribution scope fit and linked maintainer decision: routine metadata correction in existing read-only source import; no advance decision required. - CLI and MCP/tool-catalog contract: no schema, operation or argument changes; imported Kotlin files now report `language: "Kotlin"` and the source classification. - Provider, bridge, target-format, or platform compatibility: no provider or bridge changes; filename recognition is platform-independent. - Evidence, artifact, provenance, or reconstruction contract: input bytes are unchanged; original paths, sizes and hashes are preserved. Derived inventory commitments can change because corrected metadata is included. - Target selection, authority, upstream behavior, and cleanup details: unchanged. - Generated metadata, package or installation impact: none. Expected effects: - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage The new production-projection test supplies Kotlin class/script and Gradle Kotlin reader observations, with Java and `.kt.backup` controls. It verifies classifications, the derived language index, retained path/size/hash evidence, and the absence of invented Kotlin import relationships or parser failures. The same probe fails before the four-line fix and passes afterward. - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `node scripts/run-development-tests.mjs local src/application/ReferenceSourceImportEntries.test.ts` — 1 test passed with pinned Node 24.18.0 (the `test:local` entry point). - `node scripts/verify-test-discovery.mjs` — all 1244 test files discovered exactly once. - `oxfmt --check src/domain/referenceSourceClassification.ts src/application/ReferenceSourceImportEntries.test.ts` — passed. - `npm run check` — passed in the isolated Kotlin branch: typecheck, runtime build, lint, format, unused-code and metadata checks, module boundaries and architecture guards. Lint reports no errors; existing repository warnings remain. The regression exercises the production projection from reader observations. The complete filesystem import was not run on this Windows host, where the existing importer requires unavailable `O_NOFOLLOW` support. No Kotlin execution or real-provider claim is made. ## Compatibility, safety, and release - Breaking changes or migration steps: none; `.kt.backup` and existing non-Kotlin language detection are unchanged. - Real Hopper/Ghidra, browser, or OS coverage: not applicable to filename metadata recognition. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no new authority or side effects. AI assistance was used to investigate, implement and check this change. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#5654
No description provided.