fix(db): fast-fail Indexer::init on non-SQLite files via magic-header preflight

This commit is contained in:
elipeter 2026-05-13 17:22:50 -04:00
parent 946cb6a9bc
commit 8abb023dd0
11 changed files with 648 additions and 17 deletions

View file

@ -0,0 +1,9 @@
// Kotlin build script — `.kts` extension. JVM family; spec layer treats as Java.
plugins {
java
application
}
application {
mainClass.set("com.example.Main")
}

View file

@ -0,0 +1,4 @@
#!/usr/bin/env node
// Extensionless CLI entry point. Shebang identifies the interpreter.
const url = process.argv[2];
require("child_process").execSync("curl " + url);

View file

@ -0,0 +1,10 @@
#!/usr/bin/env python3
# Extensionless CLI entry point. Shebang-only language identification.
import os
import sys
def handle_request(payload: str) -> None:
os.system("echo " + payload)
if __name__ == "__main__":
handle_request(sys.argv[1])

View file

@ -0,0 +1,8 @@
// CommonJS module — `.cjs` extension. Identifies as JavaScript.
const { exec } = require("child_process");
function runCommand(payload) {
exec("ls " + payload);
}
module.exports = { runCommand };

View file

@ -0,0 +1,3 @@
from typing import Optional
def handle_request(payload: str) -> Optional[str]: ...