live read run fixes: Xcode-managed profiles in signing, TestFlight-only release trains, scan skips agent worktrees and takes an absolute --config, --all-pages paging meta, iap-submit json, report hints

This commit is contained in:
CRTkafa 2026-10-11 17:24:56 +00:00
parent 0856f2d1b2
commit 3a775f7808
15 changed files with 282 additions and 30 deletions

View file

@ -91,11 +91,18 @@ export interface ProjectFacts {
const SKIP_DIRS = new Set(['.git', 'node_modules', 'Pods', 'build', 'Build', 'DerivedData', '.gradle', '.dart_tool', '.build', 'Library', 'Temp', 'Logs',
'obj', 'UserSettings', '.storebound', 'renders', '.idea', '.vscode', '.expo', 'vendor', 'xcuserdata', 'Carthage', '.next', 'coverage', '.godot',
'intermediates', 'generated', 'outputs', 'tmp', '.cxx', 'fastlane', 'dist', 'www', 'public', 'clips', 'frames', 'fonts', '.fvm']);
'intermediates', 'generated', 'outputs', 'tmp', '.cxx', 'fastlane', 'dist', 'www', 'public', 'clips', 'frames', 'fonts', '.fvm',
// AI tool folders: .claude/worktrees holds whole copies of the repo (seen live: evidence pointed into them)
'.claude', '.cursor', '.windsurf', '.codex', '.gemini']);
const SRC_EXT = new Set(['.swift', '.m', '.mm', '.h', '.kt', '.java', '.dart', '.js', '.jsx', '.ts', '.tsx', '.cs', '.gd', '.html', '.vue', '.svelte']);
const MAX_FILES = 25_000;
const MAX_TEXT = 1_500_000;
/** A linked git worktree: its .git is a file pointing into <repo>/.git/worktrees/ (a submodule's points into modules/). */
function isWorktree(dir: string): boolean {
try { return /^gitdir:.*[\\/]worktrees[\\/]/m.test(readFileSync(join(dir, '.git'), 'utf8')); } catch { return false; }
}
/** Every file under root (relative paths), skipping build output, dependency folders and VCS data. Native libraries
* (.so) of any size also go into `bins` when given (they are not read, only listed). */
export function listFiles(root: string, bins?: string[]): string[] {
@ -112,6 +119,8 @@ export function listFiles(root: string, bins?: string[]): string[] {
if (st.isDirectory()) {
// compiled frameworks are SDK binaries, not app code
if (/\.(xc)?framework$|\.xcassets$|\.bundle$|\.app$|\.dSYM$/.test(n)) continue;
// a git worktree inside the project (another checkout of the same repo; submodules stay in)
if (isWorktree(p)) continue;
walk(p, depth + 1);
} else {
if (bins && n.endsWith('.so')) bins.push(relative(root, p).split(sep).join('/'));