* Remove internal-only tooling without changing external runtime contracts This trims the lowest-risk internal-only surfaces first: deleted internal modules are replaced by build-time no-op stubs, the bundled stuck skill is removed, and the insights S3 upload path now stays local-only. The privacy verifier is expanded and the remaining bundled internal Slack/Artifactory strings are neutralized without broad repo-wide renames. Constraint: Keep the first PR deletion-heavy and avoid mass rewrites of USER_TYPE, tengu, or claude_code identifiers Rejected: One-shot DMCA cleanup branch | too much semantic risk for a first PR Confidence: medium Scope-risk: moderate Reversibility: clean Directive: Treat full-repo typecheck as a baseline issue on this upstream snapshot; do not claim this commit introduced the existing non-Phase-A errors without isolating them first Tested: bun run build Tested: bun run smoke Tested: bun run verify:privacy Not-tested: Full repo typecheck (currently fails on widespread pre-existing upstream errors outside this change set) * Keep minimal source shims so CI can import Phase A cleanup paths The first PR removed internal-only source files entirely, but CI provider and context tests import those modules directly from source rather than through the build-time no-telemetry stubs. This restores tiny no-op source shims so tests and local source imports resolve while preserving the same external runtime behavior. Constraint: GitHub Actions runs source-level tests in addition to bundled build/privacy checks Rejected: Revert the entire deletion pass | unnecessary once the import contract is satisfied by small shims Confidence: high Scope-risk: narrow Reversibility: clean Directive: For later cleanup phases, treat build-time stubs and source-test imports as separate compatibility surfaces Tested: bun run build Tested: bun run smoke Tested: bun run verify:privacy Tested: bun run test:provider Tested: bun run test:provider-recommendation Not-tested: Full repo typecheck (still noisy on this upstream snapshot) --------- Co-authored-by: anandh8x <test@example.com>
48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { existsSync, readFileSync } from 'node:fs'
|
|
|
|
const DIST = 'dist/cli.mjs'
|
|
const BANNED_PATTERNS = [
|
|
'datadoghq.com',
|
|
'api/event_logging/batch',
|
|
'api/claude_code/metrics',
|
|
'getKubernetesNamespace',
|
|
'/var/run/secrets/kubernetes',
|
|
'/proc/self/mountinfo',
|
|
'tengu_internal_record_permission_context',
|
|
'anthropic-serve',
|
|
'infra.ant.dev',
|
|
'claude-code-feedback',
|
|
'C07VBSHV7EV',
|
|
] as const
|
|
|
|
if (!existsSync(DIST)) {
|
|
console.error(`ERROR: ${DIST} not found. Run 'bun run build' first.`)
|
|
process.exit(1)
|
|
}
|
|
|
|
const contents = readFileSync(DIST, 'utf8')
|
|
let exitCode = 0
|
|
|
|
console.log(`Checking ${DIST} for banned patterns...`)
|
|
console.log('')
|
|
|
|
for (const pattern of BANNED_PATTERNS) {
|
|
const count = contents.split(pattern).length - 1
|
|
if (count > 0) {
|
|
console.log(` FAIL: '${pattern}' found (${count} occurrences)`)
|
|
exitCode = 1
|
|
} else {
|
|
console.log(` PASS: '${pattern}' not found`)
|
|
}
|
|
}
|
|
|
|
console.log('')
|
|
|
|
if (exitCode === 0) {
|
|
console.log('✓ All checks passed — no banned patterns in build output')
|
|
} else {
|
|
console.log('✗ FAILED — banned patterns found in build output')
|
|
}
|
|
|
|
process.exit(exitCode)
|