Dashboard › institutional-transition-lab › Distillation
6576812d-2ae6-4295-8db6-023be2d6863a["lore_tm_v1_YTn4i5OvJiVOXngilQj38FCn_2GTyxYP7GLO_v-eSR8"]
detectAbsFilePath() “should always be the last detector” because, unless the input is empty, it will always claim everything it is given.governance.md first as the single source of truth for quality gates and policies.MANDATORY must pass by default, OPTIONAL warns on failure, and ADVISORY is informational only; 3. Run path-scoped gates from their declared directory; 4. Run conditional gates only when the referenced file exists; 5. Do not hardcode secrets, checking for sk_live, AKIA, and password= before commit; 6. Follow project commit conventions.terraform-github-pr-34847 moved shorthand module-source detection into internal/getmodules/moduleaddrs/. internal/getmodules/moduleaddrs/detect_remote_shorthands.go defines the backward-compatible detector order exactly as: 1. detectGitHub, 2. detectGit, 3. detectBitBucket, 4. detectGCS, 5. detectS3, 6. detectAbsFilePath; its comment says not to add new detectors and requires new source types to use canonical source-address syntax. (meaning Mar 14, 2024)terraform-github-pr-34847, internal/getmodules/moduleaddrs/detect_abs_filepath.go replaced the prior fileDetector method with detectAbsFilePath(src string). Empty input returns unclaimed; relative paths return *MaybeRelativePathErr; absolute paths become file:// URLs; and the function must be last because it claims every non-empty input. (meaning Mar 14, 2024)terraform-github-pr-34847, internal/getmodules/moduleaddrs/detect_gcs.go added detectGCS(), which recognizes strings containing googleapis.com/, requires at least 5 slash-separated parts, converts them to gcs::https://www.googleapis.com/storage/{version}/{bucket}/{object}, and reports URL is not a valid GCS URL or error parsing GCS URL: %s; detect_gcs_test.go tests three forms, including nested objects. (meaning Mar 14, 2024)terraform-github-pr-34847, internal/getmodules/moduleaddrs/detect_git.go added detectGit(), detectGitHub(), and detectBitBucket(). detectGit() only treats SSH sources with username git as Git URLs; detectGitHub() converts github.com/username/repo[/subdir] into a git::https://... source, appending .git when absent and preserving a module subdirectory. Tests include SCP-like Git URLs, query strings, subdirectories, non-GitHub hosts, and canonical git::ssh://git@git.example.com:2222/hashicorp/foo.git. (meaning Mar 14, 2024)terraform-github-pr-34847, internal/getmodules/moduleaddrs/detect_s3.go added detectS3() with path-style, old virtual-host style, and new virtual-host style normalization. Examples in detect_s3_test.go include bucket.s3.amazonaws.com/foo → s3::https://s3.amazonaws.com/bucket/foo, bucket.s3-eu-west-1.amazonaws.com/foo → s3::https://s3-eu-west-1.amazonaws.com/bucket/foo, bucket.s3.eu-west-1.amazonaws.com/foo/bar.baz → s3::https://s3.eu-west-1.amazonaws.com/bucket/foo/bar.baz, and s3.amazonaws.com/bucket/foo → s3::https://s3.amazonaws.com/bucket/foo. (meaning Mar 14, 2024)terraform-github-pr-34847, module parsing moved from package addrs/getmodules into package moduleaddrs: internal/getmodules/moduleaddrs/source_parsing.go now contains ParseModuleSource and local prefixes ./, ../, .\\, and ..\\; internal/getmodules/moduleaddrs/package.go contains NormalizePackageAddress; and corresponding tests were changed to package moduleaddrs while referencing types such as addrs.ModuleSource and addrs.ModuleSourceLocal. The rationale was to prevent the widely imported internal/addrs package from imposing the heavy indirect go-getter dependency on callers that do not parse module source addresses. (meaning Mar 14, 2024)terraform-github-pr-38385, titled Add AI agent governance, proposed governance configs for Claude Code, Cursor, Copilot, Codex, Gemini, Aider, Amazon Q, Windsurf, Cline, Continue, and Zed. Its body says crag deterministically generated 14 tool configs from one governance.md; named outputs include CLAUDE.md, AGENTS.md, .cursor/rules/governance.mdc, .github/copilot-instructions.md, and GEMINI.md, plus 9 more tool configs. The PR had 12 changed files, was closed without merging, and had head_sha=0b9819f68301eafaa8542a0d54bd56c33e680bb2. (meaning Apr 15, 2026)terraform-github-pr-38385 proposed regeneration with npx @whitehatd/crag, pre-commit synchronization via npx @whitehatd/crag hook install, and CI drift detection through .github/workflows/crag-audit.yml using WhitehatD/crag-audit-action@v1; .github/copilot-instructions.md additionally recommends crag check for infrastructure verification and crag diff for drift detection. (meaning Apr 15, 2026)terraform-github-pr-38385 added .claude/governance.md for project terraform, identifying stack go, docker, runtime Go, monolith architecture, Docker deployment, GitHub Actions CI, flat go test layout, Go package management through go.sum, and Go version >=1.25.8. Key directories were .github/ for CI/CD, docs/ for documentation, and scripts/ plus tools/ for tooling. (meaning Apr 15, 2026).claude/governance.md ordered gates as: 1. go vet ./...; 2. go test ./...; 3. go test -race -timeout=30m -v ./tfexec/internal/e2etest; 4. go test -cover "./..."); 5. go test -race ./internal/terraform ./internal/command ./internal/states; 6. make syncdeps; 7. make fmtcheck importscheck vetcheck copyright generate staticcheck exhaustive protobuf; 8. advisory go build # from .github/CONTRIBUTING.md. Informational advisories were hadolint Dockerfile and actionlint. (meaning Apr 15, 2026).claude/governance.md specified trunk-based development, free-form commits, commit trailer Co-Authored-By: Claude <noreply@anthropic.com>, and auto-commit after gates pass. Its anti-patterns were: do not ignore returned errors—handle them or explicitly discard with _ =; do not use panic() in library code—return errors; avoid init() unless absolutely necessary; do not use the latest tag in FROM; and do not run containers as root—use a non-root USER. (meaning Apr 15, 2026)terraform-github-pr-38385 included .amazonq/rules/governance.md, .claude/governance.md, .cursor/rules/governance.mdc, .windsurf/rules/governance.md, .changes/v1.16/NOTES-20260415-010000.yaml, .clinerules, .continuerules, .github/copilot-instructions.md, .rules, and AGENTS.md; the shown patches consistently required repository-local operations, minimal focused edits, no unexplained dependencies, no hardcoded secrets, and no destructive commands such as rm -rf /, DROP TABLE, force-push to main, curl|bash, dd, or docker system prune. (meaning Apr 15, 2026).clinerules mandated this workflow: 1. Read governance.md; 2. Understand which files must change; 3. Make minimal, focused changes; 4. Run all mandatory gates; 5. Commit with a conventional commit message. Gate failures could receive at most 2 automatic lint/format fix attempts before escalation to the user. (meaning Apr 15, 2026).changes/v1.16/NOTES-20260415-010000.yaml had kind: NOTES, body Add AI agent governance configuration files (CLAUDE.md, GEMINI.md, AGENTS.md, governance.md), timestamp 2026-04-15T01:00:00.000000-04:00, and custom issue "38385". (meaning Apr 15, 2026)