@@ -108,7 +108,26 @@ check() {
108108check_file_exists () {
109109 local file=" $1 "
110110 local description=" ${2:- File exists: $file } "
111- check " $description " " test -f '$REPO_PATH /$file '"
111+ # Estate-tolerant: credit documented format/case variants — .adoc docs
112+ # (estate docs policy mandates AsciiDoc), `Justfile` case, bare `LICENSE`.
113+ # Licence *content* checks are separate and unchanged (owner-gated).
114+ local candidates=(" $file " )
115+ case " $file " in
116+ * .md) candidates+=(" ${file% .md} .adoc" ) ;;
117+ LICENSE.txt) candidates+=(" LICENSE" ) ;;
118+ justfile) candidates+=(" Justfile" ) ;;
119+ esac
120+ TOTAL_CHECKS=$(( TOTAL_CHECKS + 1 ))
121+ local f
122+ for f in " ${candidates[@]} " ; do
123+ if [[ -f " $REPO_PATH /$f " ]]; then
124+ PASSED_CHECKS=$(( PASSED_CHECKS + 1 ))
125+ log_success " $description "
126+ return 0
127+ fi
128+ done
129+ log_error " $description "
130+ return 1
112131}
113132
114133check_dir_exists () {
@@ -121,7 +140,25 @@ check_file_contains() {
121140 local file=" $1 "
122141 local pattern=" $2 "
123142 local description=" ${3:- $file contains: $pattern } "
124- check " $description " " grep -q '$pattern ' '$REPO_PATH /$file ' 2>/dev/null"
143+ # Estate-tolerant: also search documented format/case variants.
144+ local candidates=(" $file " )
145+ case " $file " in
146+ * .md) candidates+=(" ${file% .md} .adoc" ) ;;
147+ justfile) candidates+=(" Justfile" ) ;;
148+ esac
149+ local existing=()
150+ local f
151+ for f in " ${candidates[@]} " ; do
152+ [[ -f " $REPO_PATH /$f " ]] && existing+=(" $REPO_PATH /$f " )
153+ done
154+ TOTAL_CHECKS=$(( TOTAL_CHECKS + 1 ))
155+ if [[ ${# existing[@]} -gt 0 ]] && grep -q " $pattern " " ${existing[@]} " 2> /dev/null; then
156+ PASSED_CHECKS=$(( PASSED_CHECKS + 1 ))
157+ log_success " $description "
158+ return 0
159+ fi
160+ log_error " $description "
161+ return 1
125162}
126163
127164check_command_exists () {
@@ -148,11 +185,12 @@ audit_category_1_infrastructure() {
148185 check_file_contains " justfile" " test" " Justfile has test recipe"
149186 check_file_contains " justfile" " validate" " Justfile has validate recipe"
150187
151- # GitLab CI/CD (or GitHub Actions as fallback)
152- if check_file_exists " .gitlab-ci.yml" " GitLab CI/CD configuration" ; then
188+ # CI/CD: GitLab CI or GitHub Actions (the estate runs on GitHub; both count)
189+ check " CI/CD configuration present" " test -f '$REPO_PATH /.gitlab-ci.yml' || ls '$REPO_PATH '/.github/workflows/*.y*ml >/dev/null 2>&1"
190+ if [[ -f " $REPO_PATH /.gitlab-ci.yml" ]]; then
153191 check_file_contains " .gitlab-ci.yml" " stages:" " GitLab CI has stages defined"
154- elif check_file_exists " .github/workflows/ci.yml " " GitHub Actions workflow " ; then
155- log_warning " Using GitHub Actions instead of GitLab CI (GitLab preferred) "
192+ else
193+ check " CI/CD has workflows defined " " ls ' $REPO_PATH '/.github/workflows/*.y*ml >/dev/null 2>&1 "
156194 fi
157195
158196 # Podman (optional for CLI tools, required for web services)
0 commit comments