Skip to content

ADR-052: scan defaults for Apps Script, .NET output, Razor and credential files (B-015, B-063, B-064, B-018) - #90

Merged
ethanblauw-hub merged 9 commits into
masterfrom
feature/adr-052-scan-defaults-and-languages
Oct 20, 2026
Merged

ethanblauw-hub merged 9 commits into
masterfrom
feature/adr-052-scan-defaults-and-languages

Conversation

@ethanblauw-hub

Copy link
Copy Markdown
Collaborator

Implements ADR-052 (backlog B-015, B-063 item 1, B-064 level 1, B-018 scan half).

What changes

  • Apps Script .gs is parsed with the JavaScript grammar (B-015).
    • When a .gs file calls a function that two files define, the call stays unresolved. Apps Script has one global scope, so no file is "nearer".
    • Member calls and .js callers keep the same-file step.
  • .NET build output stays out of the scan (B-063 item 1). obj/ is excluded everywhere; bin/ only under MSBuild's configuration folders.
  • .cshtml and .razor are indexed as text (B-064 level 1). .xaml stays opt-in.
  • Credential files are never scanned (B-018, scan half). This covers .env*, key files and gcloud's *-<12 hex>.json.
  • !name in extra_dirs, extra_root_dirs or extra_extensions drops that one default (§5, @EDB).
    • Matching ignores case.
    • A ! that matches no default raises an error, and so does a ! in a bare key.
    • extra_files keeps its existing re-include meaning.

Tests

  • Full suite: 799 passed, 1 skipped (with ADR-055 merged in) (Windows, CPU). flake8 clean. Conformance, resolution and L5X teeth baselines all hold.
  • New tests/test_scan_defaults_adr052.py, which includes the Apps Script duplicate rule and six ! tests.

🤖 Generated with Claude Code

claude and others added 9 commits October 20, 2026 20:03
…edential files

Co-Authored-By: Claude <noreply@anthropic.com>
…s and Razor

scan_policy gains .gs, .cshtml and .razor as default extensions; obj at any
depth and MSBuild's bin/Debug, bin/Release, bin/x64, bin/x86 as ignored
directories, via multi-segment ignore_dirs entries matched as consecutive
directory names; and a files / extra_files knob of file-name patterns that
are never scanned, defaulting to common credential files, with ! patterns
re-including (.env.example).

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-052 src/CLAUDE.md src/scan_policy.py]
…2 defaults

AppsScriptAdapter maps .gs to the JS grammar: a bare REGISTRY line raised
KeyError because the web adapter picks its grammar by extension. Adds a
two-file conformance fixture (1.0/1.0, new apps_script baseline row), the
.gs extension in conformance_eval, and tests for cross-file resolution,
the obj/bin rules, Razor through the fallback chunker end to end, and the
credential-file patterns.

Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-052 src/adapters/__init__.py]
Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-052]
Co-Authored-By: Claude <noreply@anthropic.com>

[ADR-052]
…er's own copy

Every .gs file shares one global scope, and the copy that loads last wins
everywhere, so a bare call with several candidates skips the same-file and
import-scoped steps. Member calls and .js callers are unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

[ADR-052 src/call_resolver.py]
…xtra_extensions

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

[ADR-052 src/CLAUDE.md src/scan_policy.py]
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

[ADR-052]
…n-defaults-and-languages [ADR-052 src/hybrid_retriever.py src/iterative_retriever.py]
@ethanblauw-hub
ethanblauw-hub merged commit 7bc8343 into master Oct 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants