declapract-typescript-ehmpathy 0.49.15 → 0.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/dist/.test/assets/cicd-common/declarations/declapract.declare.yml +8 -0
  2. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.declapract.integration.test.ts +597 -0
  3. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/.github/workflows/.test.yml +19 -0
  4. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/.github/workflows/consumer-owned.yml +21 -0
  5. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/.github/workflows/review.yml +26 -0
  6. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/declapract.use.yml +6 -0
  7. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/.test/assets/repo-with-unpinned-workflow/package.json +4 -0
  8. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/__snapshots__/.declapract.integration.test.ts.snap +604 -0
  9. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/__snapshots__/declastruct-insync-grep.declapract.integration.test.ts.snap +3 -0
  10. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/__snapshots__/report-slow-tests.play.declapract.integration.test.ts.snap +28 -0
  11. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/has-changelog-file/changelog.md.declapract.ts +11 -0
  12. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/ci-on-commit.yml.declapract.ts +3 -0
  13. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/ci_on_commit.yml.declapract.ts +3 -0
  14. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/pr-release-on-main.yml.declapract.ts +3 -0
  15. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/test-on-commit.yml.declapract.ts +3 -0
  16. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-names/.github/workflows/test_on_commit.yml.declapract.ts +3 -0
  17. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-use-apikeys/.agent/repo=.this/role=any/skills/use.apikeys.json.declapract.ts +7 -0
  18. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/bad-practices/old-use-apikeys/.agent/repo=.this/role=any/skills/use.apikeys.sh.declapract.ts +7 -0
  19. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.declapract.readme.md +8 -0
  20. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/actions/please-release/action.yml +469 -0
  21. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/actions/test-shards-setup/action.yml +68 -0
  22. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.declastruct.yml +218 -0
  23. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.install.yml +56 -0
  24. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml +434 -0
  25. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/.test.yml.declapract.ts +26 -0
  26. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/release.yml +32 -0
  27. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/report-slow-tests.sh +65 -0
  28. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/review.yml +26 -0
  29. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/test.yml +25 -0
  30. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/best-practice/.github/workflows/test.yml.declapract.ts +15 -0
  31. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/declastruct-insync-grep.declapract.integration.test.ts +49 -0
  32. package/dist/.test/assets/cicd-common/declarations/practices/cicd-common/report-slow-tests.play.declapract.integration.test.ts +161 -0
  33. package/dist/.test/assets/cicd-common/declarations/useCases.yml +11 -0
  34. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +7 -0
  35. package/dist/.test/assets/cicd-service/declarations/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -0
  36. package/dist/.test/assets/expo-fullusecase/declarations/practices/cicd-common/.declapract.integration.test.ts +15 -21
  37. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.declapract.integration.test.ts +2 -2
  38. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.gitattributes.declapract.integration.test.ts +34 -19
  39. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +3 -3
  40. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +4 -4
  41. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.declapract.readme.md +37 -0
  42. package/dist/.test/assets/expo-fullusecase/declarations/practices/git/best-practice/.gitattributes.declapract.ts +42 -63
  43. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.declapract.readme.md +8 -0
  44. package/dist/.test/assets/expo-fullusecase/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
  45. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
  46. package/dist/.test/assets/expo-fullusecase/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
  47. package/dist/.test/assets/expo-migration/declarations/practices/git/.declapract.integration.test.ts +2 -2
  48. package/dist/.test/assets/expo-migration/declarations/practices/git/.gitattributes.declapract.integration.test.ts +34 -19
  49. package/dist/.test/assets/expo-migration/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +3 -3
  50. package/dist/.test/assets/expo-migration/declarations/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +4 -4
  51. package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.declapract.readme.md +37 -0
  52. package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes.declapract.ts +42 -63
  53. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.declapract.readme.md +8 -0
  54. package/dist/.test/assets/expo-migration/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
  55. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
  56. package/dist/.test/assets/expo-migration/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
  57. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
  58. package/dist/.test/assets/expo-toolchain/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
  59. package/dist/.test/assets/git/declarations/declapract.declare.yml +8 -0
  60. package/dist/.test/assets/git/declarations/practices/git/.declapract.integration.test.ts +1001 -0
  61. package/dist/.test/assets/git/declarations/practices/git/.gitattributes.declapract.integration.test.ts +120 -0
  62. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/.gitattributes +6 -0
  63. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +7 -0
  64. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-legacy-gitattributes/package.json +4 -0
  65. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-rhachet-only/declapract.use.yml +6 -0
  66. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-with-rhachet-only/package.json +4 -0
  67. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-without-cache-ignores/declapract.use.yml +9 -0
  68. package/dist/.test/assets/git/declarations/practices/git/.test/assets/repo-without-cache-ignores/package.json +4 -0
  69. package/dist/.test/assets/git/declarations/practices/git/__snapshots__/.declapract.integration.test.ts.snap +55 -0
  70. package/dist/.test/assets/git/declarations/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +24 -0
  71. package/dist/.test/assets/git/declarations/practices/git/best-practice/.declapract.readme.md +60 -0
  72. package/dist/.test/assets/git/declarations/practices/git/best-practice/.gitattributes.declapract.ts +77 -0
  73. package/dist/.test/assets/git/declarations/practices/git/best-practice/.gitignore.declapract.ts +100 -0
  74. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.declapract.integration.test.ts +181 -0
  75. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/declapract.declare.yml +4 -0
  76. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/declapract.use.yml +11 -0
  77. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/package.json +1 -0
  78. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/.test/assets/demo-repo-with-dynamodb/useCases.yml +8 -0
  79. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/__snapshots__/.declapract.integration.test.ts.snap +234 -0
  80. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/.gitattributes.declapract.ts +56 -0
  81. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/codegen.dynamodb.dao.ts +16 -0
  82. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/package.json +16 -0
  83. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/package.json.declapract.ts +3 -0
  84. package/dist/.test/assets/git/declarations/practices/persist-with-dynamodb/best-practice/provision/docker/integration-test-db/docker-compose.yml +9 -0
  85. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.declapract.integration.test.ts +237 -0
  86. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.extensions.sql.declapract.integration.test.ts +159 -0
  87. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-config-schema/declapract.use.yml +20 -0
  88. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-config-schema/declarations/declapract.declare.yml +6 -0
  89. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-config-schema/package.json +4 -0
  90. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/codegen.sql.dao.yml +20 -0
  91. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/declapract.declare.yml +4 -0
  92. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/declapract.use.yml +19 -0
  93. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/package.json +4 -0
  94. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-on-a-prior-major/provision/docker/testdb/build-image.dockerfile +6 -0
  95. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/declapract.declare.yml +4 -0
  96. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/declapract.use.yml +21 -0
  97. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/package.json +4 -0
  98. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-custom-extensions/provision/schema/sql/init/.extensions.sql +9 -0
  99. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/config/dev.json +18 -0
  100. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.declare.yml +4 -0
  101. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/declapract.use.yml +18 -0
  102. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/demo-repo-with-dev-config/package.json +4 -0
  103. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/declapract.use.yml +4 -0
  104. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/package.json +17 -0
  105. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/left-pad@1.3.0.patch +6 -0
  106. package/dist/.test/assets/git/declarations/practices/persist-with-rds/.test/assets/repo-with-hand-patch/patches/pg-pool@3.14.0.patch +12 -0
  107. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/.declapract.integration.test.ts.snap +45 -0
  108. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/.extensions.sql.declapract.integration.test.ts.snap +77 -0
  109. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/config-validates-schema.declapract.integration.test.ts.snap +500 -0
  110. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/database-wrappers-typecheck.declapract.integration.test.ts.snap +10 -0
  111. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/deploy-database-gerunds.declapract.integration.test.ts.snap +102 -0
  112. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/engine-upgrade.declapract.integration.test.ts.snap +151 -0
  113. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/pg-pool-patch.declapract.integration.test.ts.snap +147 -0
  114. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/provision-testdb-access.declapract.integration.test.ts.snap +3 -0
  115. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/ssm-param-names.declapract.integration.test.ts.snap +9 -0
  116. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/testdb-preflight-failloud.declapract.integration.test.ts.snap +30 -0
  117. package/dist/.test/assets/git/declarations/practices/persist-with-rds/__snapshots__/with-connection-in-input.declapract.integration.test.ts.snap +57 -0
  118. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.declapract.integration.test.ts +71 -0
  119. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.declapract.readme.md +6 -0
  120. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/declapract.declare.yml +4 -0
  121. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/declapract.use.yml +19 -0
  122. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/package.json +4 -0
  123. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/.test/assets/demo-repo-with-legacy-change-id/provision/schema/sql/init.yml +15 -0
  124. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/__snapshots__/.declapract.integration.test.ts.snap +39 -0
  125. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/legacy-change-id/provision/schema/<star><star>/<star>.yml.declapract.ts +68 -0
  126. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/.declapract.readme.md +5 -0
  127. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/database.sql.declapract.ts +3 -0
  128. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/extensions.sql.declapract.ts +13 -0
  129. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/schema.sql.declapract.ts +3 -0
  130. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/user.cicd.sql.declapract.ts +3 -0
  131. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/non-prefixed-manual-init-sqls/provision/schema/sql/init/user.datalakedb.sql.declapract.ts +3 -0
  132. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-config-file-names/codegen.sql.yml.declapract.ts +3 -0
  133. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-dev-config-location/config/dev.json.declapract.ts +23 -0
  134. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.declapract.integration.test.ts +221 -0
  135. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.declapract.readme.md +11 -0
  136. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/declapract.declare.yml +4 -0
  137. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/declapract.use.yml +19 -0
  138. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/package.json +4 -0
  139. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/access/daos/daoSurfer.ts +15 -0
  140. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/domain.operations/getSurfLesson.ts +14 -0
  141. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/utils/database/getDatabaseConnection.integration.test.ts +10 -0
  142. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/demo-repo-with-old-get-database-connection/src/utils/database/getDatabaseConnection.ts +68 -0
  143. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.3a193e5.ts +65 -0
  144. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.66284e3.ts +30 -0
  145. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.68cf8ba.ts +90 -0
  146. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.9e1bdc4.ts +65 -0
  147. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.c6cef7e.ts +68 -0
  148. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.c8eb35b.ts +90 -0
  149. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.d1e8cd7.ts +31 -0
  150. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.e0c53d8.ts +90 -0
  151. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.eab15c0.ts +89 -0
  152. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.ef25ae0.ts +32 -0
  153. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/.test/assets/old-templates/getDatabaseConnection.integration.test.66284e3.ts +10 -0
  154. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/__snapshots__/.declapract.integration.test.ts.snap +75 -0
  155. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/src/<star><star>/<star>.ts.declapract.ts +33 -0
  156. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/src/utils/database/getDatabaseConnection.integration.test.ts.declapract.ts +43 -0
  157. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-get-database-connection/src/utils/database/getDatabaseConnection.ts.declapract.ts +51 -0
  158. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/.declapract.readme.md +1 -0
  159. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-dir/provision/docker/integration_test_db/<star><star>/<star>.declapract.ts +15 -0
  160. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/.declapract.readme.md +1 -0
  161. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-hyphen-dir/provision/docker/integration-test-db/<star><star>/<star>.declapract.ts +15 -0
  162. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/.declapract.readme.md +1 -0
  163. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json +8 -0
  164. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-integration-test-db-paths/package.json.declapract.ts +10 -0
  165. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json +9 -0
  166. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-packagejson-script-names/package.json.declapract.ts +22 -0
  167. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/old-param-placeholder/config/<star>.json.declapract.ts +14 -0
  168. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.declapract.integration.test.ts +86 -0
  169. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.declapract.readme.md +9 -0
  170. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/declapract.declare.yml +4 -0
  171. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/declapract.use.yml +19 -0
  172. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/package.json +4 -0
  173. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/src/access/sdks/sdkWaveArchive.ts +7 -0
  174. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/.test/assets/demo-repo-with-plaintext-pg-client/src/utils/database/getSurfReportConnection.ts +19 -0
  175. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/__snapshots__/.declapract.integration.test.ts.snap +72 -0
  176. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/pg-client-without-ssl/src/<star><star>/<star>.ts.declapract.ts +32 -0
  177. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/.declapract.readme.md +1 -0
  178. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/entities/<star>.ts.declapract.ts +12 -0
  179. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/schema-entities-dir/provision/schema/sql/entities.yml.declapract.ts +13 -0
  180. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.declapract.integration.test.ts +95 -0
  181. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/declapract.declare.yml +4 -0
  182. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/declapract.use.yml +18 -0
  183. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/package.json +4 -0
  184. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/.test/assets/demo-repo-with-terraform-ssm/provision/aws/product/parameter-store.tf +32 -0
  185. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/__snapshots__/.declapract.integration.test.ts.snap +60 -0
  186. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/terraform-parameters/provision/aws/product/parameter-store.tf.declapract.ts +94 -0
  187. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.declapract.readme.md +10 -0
  188. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/declapract.use.yml +2 -0
  189. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/package.json +4 -0
  190. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/src/domain.operations/findSurferById.ts +9 -0
  191. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/.test/assets/demo-repo-with-connection-in-input/src/utils/database/withDatabaseConnection.ts +10 -0
  192. package/dist/.test/assets/git/declarations/practices/persist-with-rds/bad-practices/with-connection-in-input/src/<star><star>/<star>.ts.declapract.ts +55 -0
  193. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/.declapract.readme.md +114 -0
  194. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -0
  195. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml +18 -0
  196. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.dao.yml.declapract.ts +35 -0
  197. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.schema.yml +6 -0
  198. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/codegen.sql.types.yml +16 -0
  199. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prep.json +40 -0
  200. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prep.json.declapract.ts +11 -0
  201. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prod.json +40 -0
  202. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/prod.json.declapract.ts +11 -0
  203. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/test.json +37 -0
  204. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/config/test.json.declapract.ts +11 -0
  205. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/package.json +36 -0
  206. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/package.json.declapract.ts +3 -0
  207. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/patches/pg-pool.patch +21 -0
  208. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/aws/readme.md +113 -0
  209. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.parameters.ts +60 -0
  210. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/aws/resources.ts +30 -0
  211. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile +7 -0
  212. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/build-image.dockerfile.declapract.ts +37 -0
  213. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/check-engine-skew.integration.test.ts +115 -0
  214. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/check-engine-skew.sh +165 -0
  215. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/compose.sh +43 -0
  216. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/docker-compose.yml +19 -0
  217. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/.gitignore +3 -0
  218. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/init/readme.md +3 -0
  219. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/docker/testdb/wait-for-postgres.sh +25 -0
  220. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/connection.config.js +36 -0
  221. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/control.yml +7 -0
  222. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/deploy.database.sh +97 -0
  223. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.database.sql +10 -0
  224. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql +16 -0
  225. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.extensions.sql.declapract.ts +46 -0
  226. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.schema.sql +11 -0
  227. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.cicd.sql +14 -0
  228. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/.user.datalakedb.sql +12 -0
  229. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/default_transaction_isolation.sql +6 -0
  230. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init/user.service.sql +16 -0
  231. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml +9 -0
  232. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/provision/schema/sql/init.yml.declapract.ts +3 -0
  233. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/.test/assets/database/getTestdbIdentity.ts +52 -0
  234. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/.test/assets/database/getTestdbPort.ts +17 -0
  235. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/config/config.schema.ts +77 -0
  236. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/asDatabaseClientSsl.test.ts +82 -0
  237. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/asDatabaseClientSsl.ts +52 -0
  238. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/databaseClientTimeouts.ts +14 -0
  239. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.integration.test.ts +10 -0
  240. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabaseConnection.ts +119 -0
  241. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/getOneDatabasePort.ts +30 -0
  242. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/rdsCaBundleUsEast1.test.ts +51 -0
  243. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/rdsCaBundleUsEast1.ts +86 -0
  244. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseContext.ts +54 -0
  245. package/dist/.test/assets/git/declarations/practices/persist-with-rds/best-practice/src/utils/database/withDatabaseTransaction.ts +35 -0
  246. package/dist/.test/assets/git/declarations/practices/persist-with-rds/config-validates-schema.declapract.integration.test.ts +332 -0
  247. package/dist/.test/assets/git/declarations/practices/persist-with-rds/database-client.declapract.integration.test.ts +291 -0
  248. package/dist/.test/assets/git/declarations/practices/persist-with-rds/database-wrappers-typecheck.declapract.integration.test.ts +225 -0
  249. package/dist/.test/assets/git/declarations/practices/persist-with-rds/deploy-database-gerunds.declapract.integration.test.ts +57 -0
  250. package/dist/.test/assets/git/declarations/practices/persist-with-rds/empty-template-declares-zero-clusters.declapract.integration.test.ts +71 -0
  251. package/dist/.test/assets/git/declarations/practices/persist-with-rds/engine-upgrade.declapract.integration.test.ts +243 -0
  252. package/dist/.test/assets/git/declarations/practices/persist-with-rds/pg-pool-patch.declapract.integration.test.ts +884 -0
  253. package/dist/.test/assets/git/declarations/practices/persist-with-rds/provision-testdb-access.declapract.integration.test.ts +50 -0
  254. package/dist/.test/assets/git/declarations/practices/persist-with-rds/ssm-param-names.declapract.integration.test.ts +154 -0
  255. package/dist/.test/assets/git/declarations/practices/persist-with-rds/testdb-per-worktree.declapract.integration.test.ts +332 -0
  256. package/dist/.test/assets/git/declarations/practices/persist-with-rds/testdb-preflight-failloud.declapract.integration.test.ts +83 -0
  257. package/dist/.test/assets/git/declarations/practices/persist-with-rds/with-connection-in-input.declapract.integration.test.ts +97 -0
  258. package/dist/.test/assets/git/declarations/practices/rhachet/.declapract.integration.test.ts +98 -0
  259. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/.agent/repo=.this/role=any/boot.yml +9 -0
  260. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.declare.yml +4 -0
  261. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/declapract.use.yml +2 -0
  262. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/demo-repo-with-consumer-boot/package.json +4 -0
  263. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/.agent/keyrack.yml +9 -0
  264. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/declapract.use.node.yml +4 -0
  265. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/declapract.use.yml +4 -0
  266. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-keyrack-extant/package.json +4 -0
  267. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-self-linked/declapract.use.yml +4 -0
  268. package/dist/.test/assets/git/declarations/practices/rhachet/.test/assets/repo-self-linked/package.json +22 -0
  269. package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/.declapract.integration.test.ts.snap +46 -0
  270. package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/boot-refs-glossary.declapract.integration.test.ts.snap +6 -0
  271. package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/boot-yml-findsert.declapract.integration.test.ts.snap +33 -0
  272. package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/keyrack-yml-findsert.declapract.integration.test.ts.snap +28 -0
  273. package/dist/.test/assets/git/declarations/practices/rhachet/__snapshots__/self-link-build-order.declapract.integration.test.ts.snap +81 -0
  274. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/deprecated-use-file/.declapract.readme.md +11 -0
  275. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/deprecated-use-file/rhachet.use.ts.declapract.ts +12 -0
  276. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.declapract.readme.md +59 -0
  277. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.declare.yml +4 -0
  278. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/declapract.use.yml +2 -0
  279. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/.test/assets/demo-repo-with-rhachet-prod-deps/package.json +12 -0
  280. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/package.json +5 -0
  281. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/prod-deps/package.json.declapract.ts +88 -0
  282. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/review-peer-artifacts/.behavior/<star><star>/.reviews/<star><star>/<star>peer-review<star>.md.declapract.ts +16 -0
  283. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/review-peer-artifacts/.behavior/<star><star>/.reviews/peer/<star><star>/<star>.md.declapract.ts +16 -0
  284. package/dist/.test/assets/git/declarations/practices/rhachet/bad-practices/review-peer-artifacts/.declapract.readme.md +12 -0
  285. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.agent/keyrack.yml.declapract.ts +143 -0
  286. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml +22 -0
  287. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.agent/repo=.this/role=any/boot.yml.declapract.ts +189 -0
  288. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.declapract.readme.md +40 -0
  289. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
  290. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/.gitignore.declapract.ts +94 -0
  291. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/package.json +19 -0
  292. package/dist/.test/assets/git/declarations/practices/rhachet/best-practice/package.json.declapract.ts +51 -0
  293. package/dist/.test/assets/git/declarations/practices/rhachet/boot-refs-glossary.declapract.integration.test.ts +91 -0
  294. package/dist/.test/assets/git/declarations/practices/rhachet/boot-yml-findsert.declapract.integration.test.ts +149 -0
  295. package/dist/.test/assets/git/declarations/practices/rhachet/keyrack-yml-findsert.declapract.integration.test.ts +105 -0
  296. package/dist/.test/assets/git/declarations/practices/rhachet/self-link-build-order.declapract.integration.test.ts +88 -0
  297. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils/blackbox/lambdas/consumeSESEmailEventFromSNS.acceptance.test.ts +23 -0
  298. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils/declapract.use.yml +9 -0
  299. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils/package.json +4 -0
  300. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-2/blackbox/lambdas/addDecoratedImage.acceptance.test.ts +19 -0
  301. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-2/declapract.use.yml +9 -0
  302. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-2/package.json +4 -0
  303. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-3/blackbox/lambdas/addDecoratedImage.acceptance.test.ts +19 -0
  304. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-3/declapract.use.yml +9 -0
  305. package/dist/.test/assets/git/declarations/practices/tests-any/.test/assets/repo-old-acceptance-utils-3/package.json +4 -0
  306. package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/changedsince-origin-main.declapract.integration.test.ts.snap +8 -0
  307. package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/livedb-wake-branches.declapract.integration.test.ts.snap +6 -0
  308. package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/old-acceptance-test-utils.declapract.integration.test.ts.snap +162 -0
  309. package/dist/.test/assets/git/declarations/practices/tests-any/__snapshots__/test-kind-seam.declapract.integration.test.ts.snap +9 -0
  310. package/dist/.test/assets/git/declarations/practices/tests-any/autoprune-hooks.declapract.integration.test.ts +111 -0
  311. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.declapract.integration.test.ts +69 -0
  312. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.declapract.readme.md +19 -0
  313. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.test/assets/demo-repo-with-stale-test-fns-dep/declapract.use.yml +3 -0
  314. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/.test/assets/demo-repo-with-stale-test-fns-dep/package.json +11 -0
  315. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/__snapshots__/.declapract.integration.test.ts.snap +43 -0
  316. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/dev-tool-in-dependencies/package.json.declapract.ts +81 -0
  317. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/javascript-config-files/.declapract.readme.md +1 -0
  318. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/javascript-config-files/jest.<star>.js.declapract.ts +17 -0
  319. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/mocks/.declapract.readme.md +8 -0
  320. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/mocks/<star><star>/__mock__/<star>.js +3 -0
  321. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/mocks/<star><star>/__mock__/<star>.ts +3 -0
  322. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.declapract.integration.test.ts +83 -0
  323. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.declapract.readme.md +22 -0
  324. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/accept.blackbox/.test/assets/.agent/config.yml +1 -0
  325. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/accept.blackbox/.test/assets/.rhachet/manifest.json +1 -0
  326. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/accept.blackbox/somefile.ts +1 -0
  327. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/declapract.use.yml +6 -0
  328. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/.test/assets/demo-repo-with-accept-blackbox-dir/package.json +4 -0
  329. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/accept.blackbox/<star><star>/<star>.declapract.ts +19 -0
  330. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-dir-location/acceptance/<star><star>/<star>.declapract.ts +19 -0
  331. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/.declapract.readme.md +31 -0
  332. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-import-paths/<star><star>/<star>.ts.declapract.ts +25 -0
  333. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/_utils/getDataFromLastOpenBracketAtStartOfLine.ts.declapract.ts +3 -0
  334. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/_utils/invokeLambda.ts.declapract.ts +3 -0
  335. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils/blackbox/lambdas/<star>.ts.declapract.ts +49 -0
  336. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils-2/blackbox/lambdas/<star>.ts.declapract.ts +27 -0
  337. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils-3/blackbox/_utils/environment.ts.declapract.ts +3 -0
  338. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-acceptance-test-utils-3/blackbox/lambdas/<star>.ts.declapract.ts +23 -0
  339. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-extension-pattern/.declapract.readme.md +3 -0
  340. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-extension-pattern/<star><star>/<star>.test.acceptance.ts.declapract.ts +11 -0
  341. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-extension-pattern/<star><star>/<star>.test.integration.ts.declapract.ts +11 -0
  342. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/.declapract.readme.md +8 -0
  343. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/<star><star>/<star>.ts.declapract.ts +27 -0
  344. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/<star><star>/__test_assets__/<star><star>/<star>.declapract.ts +17 -0
  345. package/dist/.test/assets/git/declarations/practices/tests-any/bad-practices/old-test-utils-and-assets-location/<star><star>/__test_utils__/<star><star>/<star>.declapract.ts +17 -0
  346. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/.declapract.readme.md +52 -0
  347. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/.declapract.todo.md +3 -0
  348. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
  349. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/package.json +18 -0
  350. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/package.json.declapract.ts +3 -0
  351. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/src/.test/useWakeOfLivedb.ts +209 -0
  352. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/src/<star><star>/<star>.integration.test.ts.declapract.ts +8 -0
  353. package/dist/.test/assets/git/declarations/practices/tests-any/best-practice/src/<star><star>/<star>.test.ts.declapract.ts +7 -0
  354. package/dist/.test/assets/git/declarations/practices/tests-any/build-ifstale.declapract.integration.test.ts +124 -0
  355. package/dist/.test/assets/git/declarations/practices/tests-any/changedsince-origin-main.declapract.integration.test.ts +58 -0
  356. package/dist/.test/assets/git/declarations/practices/tests-any/livedb-wake-branches.declapract.integration.test.ts +315 -0
  357. package/dist/.test/assets/git/declarations/practices/tests-any/old-acceptance-test-utils.declapract.integration.test.ts +122 -0
  358. package/dist/.test/assets/git/declarations/practices/tests-any/package.json.shell-flags.declapract.integration.test.ts +139 -0
  359. package/dist/.test/assets/git/declarations/practices/tests-any/test-kind-seam.declapract.integration.test.ts +87 -0
  360. package/dist/.test/assets/git/declarations/useCases.yml +29 -0
  361. package/dist/.test/assets/{expo-fullusecase/declarations/practices/git/best-practice → git/repo-with-all-gitattributes-declarers}/.gitattributes +3 -0
  362. package/dist/.test/assets/git/repo-with-all-gitattributes-declarers/declapract.use.yml +26 -0
  363. package/dist/.test/assets/git/repo-with-all-gitattributes-declarers/package.json +4 -0
  364. package/dist/.test/assets/rhachet/declarations/practices/rhachet/best-practice/.declapract.readme.md +8 -0
  365. package/dist/.test/assets/rhachet/declarations/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
  366. package/dist/.test/assets/tests-any-only/declarations/practices/tests-any/best-practice/.declapract.readme.md +7 -0
  367. package/dist/.test/assets/tests-any-only/declarations/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
  368. package/dist/__snapshots__/gitattributesDeclarers.declapract.integration.test.ts.snap +79 -0
  369. package/dist/__snapshots__/repoSkills.declapract.acceptance.test.ts.snap +512 -0
  370. package/dist/gitattributesDeclarers.declapract.integration.test.ts +438 -0
  371. package/dist/practiceOwnerPerFile.declapract.integration.test.ts +53 -0
  372. package/dist/practices/cicd-common/.declapract.integration.test.ts +15 -21
  373. package/dist/practices/git/.declapract.integration.test.ts +2 -2
  374. package/dist/practices/git/.gitattributes.declapract.integration.test.ts +34 -19
  375. package/dist/practices/git/.test/assets/repo-with-legacy-gitattributes/declapract.use.yml +3 -3
  376. package/dist/practices/git/__snapshots__/.gitattributes.declapract.integration.test.ts.snap +4 -4
  377. package/dist/practices/git/best-practice/.declapract.readme.md +37 -0
  378. package/dist/practices/git/best-practice/.gitattributes.declapract.ts +42 -63
  379. package/dist/practices/persist-with-dynamodb/best-practice/.gitattributes.declapract.ts +56 -0
  380. package/dist/practices/persist-with-rds/best-practice/.declapract.readme.md +7 -0
  381. package/dist/practices/persist-with-rds/best-practice/.gitattributes.declapract.ts +64 -0
  382. package/dist/practices/rhachet/best-practice/.declapract.readme.md +8 -0
  383. package/dist/practices/rhachet/best-practice/.gitattributes.declapract.ts +65 -0
  384. package/dist/practices/tests-any/best-practice/.declapract.readme.md +7 -0
  385. package/dist/practices/tests-any/best-practice/.gitattributes.declapract.ts +60 -0
  386. package/dist/repoSkills.declapract.acceptance.test.ts +1150 -0
  387. package/dist/utils/defineExpectedGitattributesContents.ts +247 -0
  388. package/package.json +4 -4
  389. package/dist/.test/assets/expo-migration/declarations/practices/git/best-practice/.gitattributes +0 -7
  390. package/dist/practices/git/best-practice/.gitattributes +0 -7
@@ -0,0 +1,434 @@
1
+ name: .test
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ creds-aws-role-arn:
7
+ description: "creds for aws, specifies the role to assume via oidc. if not provided, aws auth is skipped"
8
+ required: false
9
+ type: string
10
+ creds-aws-region:
11
+ description: "creds for aws, specifies the region. defaults to us-east-1"
12
+ required: false
13
+ type: string
14
+ default: "us-east-1"
15
+
16
+ # .why = least privilege: only the jobs that assume the aws role grant id-token, at job scope
17
+ permissions:
18
+ contents: read
19
+
20
+ jobs:
21
+ # install the dependencies
22
+ install:
23
+ uses: ./.github/workflows/.install.yml
24
+
25
+ # run tests in parallel
26
+ test-commits:
27
+ runs-on: ubuntu-24.04
28
+ needs: [install, test-shards-omit]
29
+ steps:
30
+ - name: checkout
31
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
32
+ with:
33
+ fetch-depth: 0 # we need all commits to test:commits
34
+
35
+ - name: set node-version
36
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
37
+ with:
38
+ node-version-file: ".nvmrc"
39
+
40
+ - name: get node-modules from cache
41
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
42
+ with:
43
+ path: ./node_modules
44
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
45
+
46
+ - name: test:commits
47
+ run: npm run test:commits
48
+
49
+ test-types:
50
+ runs-on: ubuntu-24.04
51
+ needs: [install, test-shards-omit]
52
+ steps:
53
+ - name: checkout
54
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
55
+
56
+ - name: set node-version
57
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
58
+ with:
59
+ node-version-file: ".nvmrc"
60
+
61
+ - name: get node-modules from cache
62
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
63
+ with:
64
+ path: ./node_modules
65
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
66
+
67
+ - name: build
68
+ run: npm run build # build before test:types, to ensure .dist/ artifacts are importable for blackbox tests
69
+
70
+ - name: test:types
71
+ run: npm run test:types
72
+
73
+ test-format:
74
+ runs-on: ubuntu-24.04
75
+ needs: [install, test-shards-omit]
76
+ steps:
77
+ - name: checkout
78
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
79
+
80
+ - name: set node version
81
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
82
+ with:
83
+ node-version-file: ".nvmrc"
84
+
85
+ - name: get node-modules from cache
86
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
87
+ with:
88
+ path: ./node_modules
89
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
90
+
91
+ - name: test:format
92
+ run: npm run test:format
93
+
94
+ test-lint:
95
+ runs-on: ubuntu-24.04
96
+ needs: [install, test-shards-omit]
97
+ steps:
98
+ - name: checkout
99
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
100
+
101
+ - name: set node-version
102
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
103
+ with:
104
+ node-version-file: ".nvmrc"
105
+
106
+ - name: get node-modules from cache
107
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
108
+ with:
109
+ path: ./node_modules
110
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
111
+
112
+ # .why = lint the same linked .agent/repo=* role tree a laptop holds
113
+ - name: prepare:rhachet
114
+ run: npm run prepare:rhachet --if-present
115
+
116
+ - name: test:lint
117
+ run: npm run test:lint
118
+
119
+ test-unit:
120
+ runs-on: ubuntu-24.04
121
+ needs: [install, test-shards-omit]
122
+ steps:
123
+ - name: checkout
124
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
125
+
126
+ - name: set node-version
127
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
128
+ with:
129
+ node-version-file: ".nvmrc"
130
+
131
+ - name: get node-modules from cache
132
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
133
+ with:
134
+ path: ./node_modules
135
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
136
+
137
+ - name: test:unit
138
+ run: THOROUGH=true npm run test:unit
139
+
140
+ # shard setup job
141
+ enshard:
142
+ name: enshard
143
+ runs-on: ubuntu-24.04
144
+ outputs:
145
+ integration-matrix: ${{ steps.integration.outputs.matrix }}
146
+ integration-patterns: ${{ steps.integration.outputs.patterns }}
147
+ acceptance-matrix: ${{ steps.acceptance.outputs.matrix }}
148
+ acceptance-patterns: ${{ steps.acceptance.outputs.patterns }}
149
+ steps:
150
+ - name: checkout
151
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
152
+ with:
153
+ sparse-checkout: |
154
+ jest.integration.shards.jsonc
155
+ jest.acceptance.shards.jsonc
156
+ .github/actions/test-shards-setup
157
+ sparse-checkout-cone-mode: false
158
+
159
+ - name: setup integration shards
160
+ id: integration
161
+ uses: ./.github/actions/test-shards-setup
162
+ with:
163
+ config-file: jest.integration.shards.jsonc
164
+ test-type: integration
165
+
166
+ - name: setup acceptance shards
167
+ id: acceptance
168
+ uses: ./.github/actions/test-shards-setup
169
+ with:
170
+ config-file: jest.acceptance.shards.jsonc
171
+ test-type: acceptance
172
+
173
+ # placeholder job for github actions visualization alignment
174
+ # note: github actions has no column position controls;
175
+ # this job pushes test-* jobs one column right to align with test-shards-* column
176
+ test-shards-omit:
177
+ runs-on: ubuntu-24.04
178
+ needs: [install]
179
+ steps:
180
+ - run: echo "👌 placeholder for column alignment"
181
+
182
+ # shard runner jobs
183
+ test-shards-integration:
184
+ runs-on: ubuntu-24.04
185
+ needs: [install, enshard]
186
+ permissions:
187
+ contents: read
188
+ id-token: write # required for oidc
189
+ strategy:
190
+ fail-fast: false
191
+ matrix:
192
+ shard: ${{ fromJson(needs.enshard.outputs.integration-matrix) }}
193
+ steps:
194
+ - name: checkout
195
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
196
+
197
+ - name: set node-version
198
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
199
+ with:
200
+ node-version-file: ".nvmrc"
201
+
202
+ - name: get node-modules from cache
203
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
204
+ with:
205
+ path: ./node_modules
206
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
207
+
208
+ # .why = keyrack.yml can extend other manifests via symlinks (e.g., .agent/repo=ehmpathy/role=mechanic/keyrack.yml)
209
+ # prepare:rhachet creates these symlinks so keyrack.source() can hydrate extended keys
210
+ - name: prepare:rhachet
211
+ run: npm run prepare:rhachet --if-present
212
+
213
+ # .why = keyrack firewall translates and validates secrets before tests run
214
+ # - filters to declared keys in keyrack.yml
215
+ # - translates mechanisms (e.g., GitHub App → ghs_* token)
216
+ # - blocks dangerous patterns (ghp_*, AKIA*, etc.)
217
+ # - exports to $GITHUB_ENV with mask applied
218
+ - name: keyrack firewall
219
+ run: npx rhachet keyrack firewall --env test --from 'json(env://SECRETS_JSON)' --into github.actions
220
+ env:
221
+ SECRETS_JSON: ${{ toJSON(secrets) }}
222
+
223
+ - name: get aws auth, if creds supplied
224
+ if: ${{ inputs.creds-aws-role-arn }}
225
+ uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
226
+ with:
227
+ role-to-assume: ${{ inputs.creds-aws-role-arn }}
228
+ aws-region: ${{ inputs.creds-aws-region }}
229
+
230
+ - name: start:testdb
231
+ run: npm run start:testdb --if-present
232
+
233
+ - name: start:livedb:prep
234
+ run: npm run start:livedb:prep --if-present
235
+
236
+ - name: build
237
+ run: npm run build
238
+
239
+ - name: test:integration (explicit ${{ matrix.shard.index }})
240
+ if: matrix.shard.type == 'explicit'
241
+ run: |
242
+ set -eu
243
+ patterns='${{ join(matrix.shard.patterns, '|') }}'
244
+ THOROUGH=true npm run test:integration -- --testPathPatterns="$patterns" --json --outputFile=jest-results.json
245
+
246
+ - name: test:integration (dynamic ${{ matrix.shard.shard }}/${{ matrix.shard.total }})
247
+ if: matrix.shard.type == 'dynamic'
248
+ run: |
249
+ set -eu
250
+ exclude='${{ needs.enshard.outputs.integration-patterns }}'
251
+ if [[ -n "$exclude" ]]; then
252
+ THOROUGH=true npm run test:integration -- --testPathIgnorePatterns="$exclude" --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json
253
+ else
254
+ THOROUGH=true npm run test:integration -- --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json
255
+ fi
256
+
257
+ - name: report slow tests
258
+ if: always() && hashFiles('jest-results.json') != ''
259
+ run: bash .github/workflows/report-slow-tests.sh jest-results.json
260
+
261
+ test-shards-acceptance:
262
+ runs-on: ubuntu-24.04
263
+ needs: [install, enshard]
264
+ permissions:
265
+ contents: read
266
+ id-token: write # required for oidc
267
+ strategy:
268
+ fail-fast: false
269
+ matrix:
270
+ shard: ${{ fromJson(needs.enshard.outputs.acceptance-matrix) }}
271
+ steps:
272
+ - name: checkout
273
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
274
+
275
+ - name: set node-version
276
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
277
+ with:
278
+ node-version-file: ".nvmrc"
279
+
280
+ - name: get node-modules from cache
281
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
282
+ with:
283
+ path: ./node_modules
284
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
285
+
286
+ # .why = keyrack.yml can extend other manifests via symlinks (e.g., .agent/repo=ehmpathy/role=mechanic/keyrack.yml)
287
+ # prepare:rhachet creates these symlinks so keyrack.source() can hydrate extended keys
288
+ - name: prepare:rhachet
289
+ run: npm run prepare:rhachet --if-present
290
+
291
+ # .why = keyrack firewall translates and validates secrets before tests run
292
+ # - filters to declared keys in keyrack.yml
293
+ # - translates mechanisms (e.g., GitHub App → ghs_* token)
294
+ # - blocks dangerous patterns (ghp_*, AKIA*, etc.)
295
+ # - exports to $GITHUB_ENV with mask applied
296
+ - name: keyrack firewall
297
+ run: npx rhachet keyrack firewall --env test --from 'json(env://SECRETS_JSON)' --into github.actions
298
+ env:
299
+ SECRETS_JSON: ${{ toJSON(secrets) }}
300
+
301
+ - name: get aws auth, if creds supplied
302
+ if: ${{ inputs.creds-aws-role-arn }}
303
+ uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
304
+ with:
305
+ role-to-assume: ${{ inputs.creds-aws-role-arn }}
306
+ aws-region: ${{ inputs.creds-aws-region }}
307
+
308
+ - name: start:testdb
309
+ run: npm run start:testdb --if-present
310
+
311
+ - name: start:livedb:prep
312
+ run: npm run start:livedb:prep --if-present
313
+
314
+ - name: build
315
+ run: npm run build
316
+
317
+ # .why = the PR acceptance gate runs IN-PROCESS (LOCALLY=true), not against a deployed fleet.
318
+ # a PR has no deployed lambda to invoke, and a service that publishes only dev/prep (no
319
+ # `test` fleet) would target `svc-<name>-test-*` — a slug that does not exist — and 404
320
+ # on every call. in-process runs the handler directly, so a fleetless service inherits a
321
+ # green PR gate out of the box rather than hand-patching LOCALLY=true into this shard.
322
+ # the deployed-fleet acceptance run is a separate post-deploy grain (.deploy-sls.yml).
323
+ - name: test:acceptance (explicit ${{ matrix.shard.index }})
324
+ if: matrix.shard.type == 'explicit'
325
+ run: |
326
+ set -eu
327
+ patterns='${{ join(matrix.shard.patterns, '|') }}'
328
+ LOCALLY=true THOROUGH=true npm run test:acceptance -- --testPathPatterns="$patterns" --json --outputFile=jest-results.json
329
+
330
+ - name: test:acceptance (dynamic ${{ matrix.shard.shard }}/${{ matrix.shard.total }})
331
+ if: matrix.shard.type == 'dynamic'
332
+ run: |
333
+ set -eu
334
+ exclude='${{ needs.enshard.outputs.acceptance-patterns }}'
335
+ if [[ -n "$exclude" ]]; then
336
+ LOCALLY=true THOROUGH=true npm run test:acceptance -- --testPathIgnorePatterns="$exclude" --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json
337
+ else
338
+ LOCALLY=true THOROUGH=true npm run test:acceptance -- --shard=${{ matrix.shard.shard }}/${{ matrix.shard.total }} --json --outputFile=jest-results.json
339
+ fi
340
+
341
+ - name: report slow tests
342
+ if: always() && hashFiles('jest-results.json') != ''
343
+ run: bash .github/workflows/report-slow-tests.sh jest-results.json
344
+
345
+ # .why = evaluation tests grade a brain's output and sit outside the unit, integration, and
346
+ # acceptance globs, so no other job runs them. in a repo with no `test:evaluation`
347
+ # command, every step after the presence check is skipped, so the job costs one checkout
348
+ test-evaluation:
349
+ runs-on: ubuntu-24.04
350
+ needs: [install]
351
+ permissions:
352
+ contents: read
353
+ id-token: write # required for oidc
354
+ steps:
355
+ - name: checkout
356
+ uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
357
+
358
+ - name: has test:evaluation?
359
+ id: presence
360
+ run: echo "declared=$(jq -r '.scripts["test:evaluation"] != null' package.json)" >> "$GITHUB_OUTPUT"
361
+
362
+ - name: set node-version
363
+ if: steps.presence.outputs.declared == 'true'
364
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
365
+ with:
366
+ node-version-file: ".nvmrc"
367
+
368
+ - name: get node-modules from cache
369
+ if: steps.presence.outputs.declared == 'true'
370
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
371
+ with:
372
+ path: ./node_modules
373
+ key: ${{ needs.install.outputs.node-modules-cache-key }}
374
+
375
+ - name: prepare:rhachet
376
+ if: steps.presence.outputs.declared == 'true'
377
+ run: npm run prepare:rhachet --if-present
378
+
379
+ - name: keyrack firewall
380
+ if: steps.presence.outputs.declared == 'true'
381
+ run: npx rhachet keyrack firewall --env test --from 'json(env://SECRETS_JSON)' --into github.actions
382
+ env:
383
+ SECRETS_JSON: ${{ toJSON(secrets) }}
384
+
385
+ - name: get aws auth, if creds supplied
386
+ if: ${{ steps.presence.outputs.declared == 'true' && inputs.creds-aws-role-arn }}
387
+ uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4
388
+ with:
389
+ role-to-assume: ${{ inputs.creds-aws-role-arn }}
390
+ aws-region: ${{ inputs.creds-aws-region }}
391
+
392
+ - name: start:testdb
393
+ if: steps.presence.outputs.declared == 'true'
394
+ run: npm run start:testdb --if-present
395
+
396
+ - name: build
397
+ if: steps.presence.outputs.declared == 'true'
398
+ run: npm run build
399
+
400
+ - name: test:evaluation
401
+ if: steps.presence.outputs.declared == 'true'
402
+ run: npm run test:evaluation --if-present
403
+
404
+ # union job: aggregates shard results into single status for pr merge constraints
405
+ test-integration:
406
+ runs-on: ubuntu-24.04
407
+ needs: [install, enshard, test-shards-integration]
408
+ if: always() && needs.install.result == 'success' && needs.enshard.result == 'success'
409
+ steps:
410
+ - name: report shard results
411
+ run: |
412
+ set -eu
413
+ if [[ "${{ needs.test-shards-integration.result }}" == "success" ]]; then
414
+ echo "👌 all integration test shards passed"
415
+ else
416
+ echo "::error::some integration test shards failed"
417
+ exit 1
418
+ fi
419
+
420
+ # union job: aggregates shard results into single status for pr merge constraints
421
+ test-acceptance-locally:
422
+ runs-on: ubuntu-24.04
423
+ needs: [install, enshard, test-shards-acceptance]
424
+ if: always() && needs.install.result == 'success' && needs.enshard.result == 'success'
425
+ steps:
426
+ - name: report shard results
427
+ run: |
428
+ set -eu
429
+ if [[ "${{ needs.test-shards-acceptance.result }}" == "success" ]]; then
430
+ echo "👌 all acceptance test shards passed"
431
+ else
432
+ echo "::error::some acceptance test shards failed"
433
+ exit 1
434
+ fi
@@ -0,0 +1,26 @@
1
+ import { FileCheckType, type FileFixFunction } from 'declapract';
2
+ import { MalfunctionError } from 'helpful-errors';
3
+
4
+ /**
5
+ * .what = validates .test.yml matches the template exactly
6
+ * .why = keyrack firewall handles secrets at runtime; no build-time injection needed
7
+ */
8
+ export const check = FileCheckType.EQUALS;
9
+
10
+ /**
11
+ * .what = replaces .test.yml with the template content
12
+ * .why = ensures workflow has firewall step for keyrack secrets
13
+ * .note = fail-fast on absent declared contents. a declared file ALWAYS has content — declapract
14
+ * reads the template beside this declaration. so a null/undefined `declaredFileContents`
15
+ * is an internal invariant violation (a build wired wrong), never a valid state; a `?? ''`
16
+ * would swallow it and write a ZERO-BYTE workflow to a consumer — a silent break the wish
17
+ * forbids. throw loud so the misconfigured build surfaces, rather than ship an empty file.
18
+ */
19
+ export const fix: FileFixFunction = async (_contents, context) => {
20
+ if (context.declaredFileContents === null || context.declaredFileContents === undefined)
21
+ throw new MalfunctionError(
22
+ 'no declaredFileContents for .test.yml — declapract could not read the template beside its declaration',
23
+ { relativeFilePath: '.github/workflows/.test.yml' },
24
+ );
25
+ return { contents: context.declaredFileContents };
26
+ };
@@ -0,0 +1,32 @@
1
+ name: release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ please-release:
10
+ runs-on: ubuntu-24.04
11
+ steps:
12
+ - name: get github token
13
+ id: github-token
14
+ uses: actions/create-github-app-token@fee1f7d63c2ff003460e3d139729b119787bc349 # v2
15
+ with:
16
+ owner: ${{ github.repository_owner }}
17
+ repositories: ${{ github.event.repository.name }}
18
+ app-id: ${{ vars.RHELEASE_APP_ID }}
19
+ private-key: ${{ secrets.RHELEASE_APP_PRIVATE_KEY }}
20
+
21
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
22
+ with:
23
+ fetch-depth: 0
24
+ token: ${{ steps.github-token.outputs.token }} # enables git push with app token
25
+
26
+ - name: please release
27
+ uses: ./.github/actions/please-release
28
+ with:
29
+ github-token: ${{ steps.github-token.outputs.token }}
30
+ commit-message: ${{ github.event.head_commit.message }}
31
+ commit-sha: ${{ github.sha }}
32
+ repository: ${{ github.repository }}
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env bash
2
+ ######################################################################
3
+ # .what = rank test files by wall-clock duration from a jest --json report
4
+ #
5
+ # .why = jest 30 dropped the perfStats key that the prior report filtered on
6
+ # (`perfStats.runtime`), so the filter matched zero rows and the report
7
+ # went silent-green for its whole life. endTime-startTime
8
+ # (epoch ms) is the only per-file duration jest 30 still emits, so read
9
+ # the wall-clock span instead — and fail LOUD if a future schema change
10
+ # zeroes it again, never silent-green.
11
+ #
12
+ # usage:
13
+ # report-slow-tests.sh [jest-results.json]
14
+ #
15
+ # guarantee:
16
+ # - exit 0 = report written to $GITHUB_STEP_SUMMARY (or /dev/null locally)
17
+ # - exit 0 = empty shard (0 test files) — a legitimate state, stated explicitly
18
+ # - exit 1 = non-empty report yielded zero real durations (schema drift)
19
+ ######################################################################
20
+ set -eu
21
+
22
+ results="${1:-jest-results.json}"
23
+
24
+ total=$(jq '.testResults | length' "$results")
25
+ durations=$(jq -r '.testResults[] | "\((.endTime // 0) - (.startTime // 0)):\(.name)"' "$results" | sort -t: -k1 -rn)
26
+
27
+ summary="${GITHUB_STEP_SUMMARY:-/dev/null}"
28
+
29
+ # an empty shard (no matched files) is legitimate — say so explicitly, never fail.
30
+ if [[ "$total" -eq 0 ]]; then
31
+ echo "slow-test report: 0 test files in $results (empty shard)" >> "$summary"
32
+ exit 0
33
+ fi
34
+
35
+ # a non-empty testResults that yields zero real durations means the jest --json duration
36
+ # schema changed again — the silent death this check exists to catch. fail loud, never silent-green.
37
+ nonzero=$(printf '%s\n' "$durations" | awk -F: '$1 > 0' | wc -l | tr -d ' ')
38
+ if [[ "$nonzero" -eq 0 ]]; then
39
+ echo "::error::slow-test report parsed 0 durations from $total test files — the jest --json duration schema likely changed; read endTime/startTime from one entry of $results to see what moved"
40
+ exit 1
41
+ fi
42
+
43
+ # a ranked table into the step summary — annotations cannot be sorted, and a diagnosis
44
+ # needs the order (the single slowest file sets the suite's wall-clock floor).
45
+ {
46
+ echo "### slowest test files"
47
+ echo ""
48
+ echo "| duration | file |"
49
+ echo "| --- | --- |"
50
+ printf '%s\n' "$durations" | while IFS=: read -r ms name; do
51
+ [ -z "$name" ] && continue
52
+ printf '| %ds | %s |\n' "$((ms / 1000))" "$name"
53
+ done
54
+ } >> "$summary"
55
+
56
+ # inline annotations flag the outliers at their file (the 30s/10s thresholds are inherited).
57
+ printf '%s\n' "$durations" | while IFS=: read -r ms name; do
58
+ [ -z "$name" ] && continue
59
+ seconds=$((ms / 1000))
60
+ if [[ $seconds -ge 30 ]]; then
61
+ echo "::warning file=${name}::slow test: ${seconds}s"
62
+ elif [[ $seconds -ge 10 ]]; then
63
+ echo "::notice file=${name}::test duration: ${seconds}s"
64
+ fi
65
+ done
@@ -0,0 +1,26 @@
1
+ name: review
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - edited
8
+ - synchronize
9
+
10
+ permissions:
11
+ pull-requests: read
12
+
13
+ jobs:
14
+ pullreq-title:
15
+ runs-on: ubuntu-24.04
16
+ steps:
17
+ - name: test:pullreq:title
18
+ uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
19
+ env:
20
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21
+ with:
22
+ # https://github.com/commitizen/conventional-commit-types
23
+ types: |
24
+ fix
25
+ feat
26
+ chore
@@ -0,0 +1,25 @@
1
+ name: test
2
+
3
+ on:
4
+ workflow_call:
5
+ push:
6
+ branches-ignore:
7
+ - main # exclude main branch, since deploy workflow triggers on main, and calls the test workflow inside of it already
8
+ tags-ignore:
9
+ - v* # exclude tags, since deploy workflow triggers on tags, and calls the test workflow inside of it already
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }} # per [workflow] x [branch, tag]
13
+ cancel-in-progress: true # cancel workflows for non-latest commits
14
+
15
+ permissions:
16
+ id-token: write # required for oidc
17
+ contents: read
18
+
19
+ jobs:
20
+ suite:
21
+ uses: ./.github/workflows/.test.yml
22
+ with:
23
+ creds-aws-region: us-east-1
24
+ creds-aws-role-arn: ${{ vars.CREDS_CICD_AWS_PREP_OIDC_ROLE_ARN }} # use aws auth via oidc, if this repo supplies it
25
+ secrets: inherit # keyrack firewall in .test.yml filters to declared keys
@@ -0,0 +1,15 @@
1
+ import { FileCheckType, type FileFixFunction } from 'declapract';
2
+
3
+ /**
4
+ * .what = validates test.yml matches the template exactly
5
+ * .why = secrets: inherit passes all secrets to .test.yml; firewall handles key filter at runtime
6
+ */
7
+ export const check = FileCheckType.EQUALS;
8
+
9
+ /**
10
+ * .what = replaces test.yml with the template content
11
+ * .why = ensures caller workflow has secrets: inherit for firewall
12
+ */
13
+ export const fix: FileFixFunction = async (_contents, context) => {
14
+ return { contents: context.declaredFileContents ?? '' };
15
+ };
@@ -0,0 +1,49 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+
4
+ import { given, then, when } from 'test-fns';
5
+
6
+ /**
7
+ * .what = clamps #561: the .declastruct.yml apply-gate greps the LOWERCASE marker declastruct
8
+ * actually emits (`🎉 everything is in sync!`), so the in-sync fast path is live, not dead.
9
+ * .why = declastruct's marker is lowercase (planChanges.ts: `context.log.info('🎉 everything is in
10
+ * sync!')`). a capital-E `Everything is in sync` grep is case-sensitive and never matches, so
11
+ * every plan falls to the has-changes-planned=true arm — a fast path dead its whole life. it
12
+ * fails SAFE (over-gates), so no alarm ever fired; a clamp is the only thing that keeps the
13
+ * grep tied to the tool's real output.
14
+ * .teeth = revert the grep to `grep "Everything is in sync"` (capital E) and the "greps the
15
+ * lowercase marker" assertion reddens.
16
+ * .note = the subject is the shipped TEMPLATE, read from __dirname. this file sits at the practice
17
+ * ROOT, so declapract never emits it (per the #583 relocation convention).
18
+ */
19
+ describe('cicd-common .declastruct.yml in-sync grep', () => {
20
+ given('the shipped .declastruct.yml', () => {
21
+ const yml = readFileSync(
22
+ join(__dirname, 'best-practice/.github/workflows/.declastruct.yml'),
23
+ 'utf8',
24
+ );
25
+
26
+ when('the apply-gate grep is read', () => {
27
+ // declastruct emits this literal phrase, lowercase; the workflow must match it verbatim
28
+ const markerLower = 'everything is in sync';
29
+ const markerCapital = 'Everything is in sync';
30
+
31
+ then('it greps the lowercase marker declastruct actually emits', () => {
32
+ expect(yml).toContain(`grep -qF "${markerLower}"`);
33
+ });
34
+
35
+ then('it does NOT grep the capital-E form that never matches (#561)', () => {
36
+ expect(yml).not.toContain(markerCapital);
37
+ });
38
+
39
+ then('the emitted apply-gate grep line matches snapshot', () => {
40
+ // snapshot the caller-faced contract itself, so a reword that keeps the
41
+ // marker token green (a re-ordered -qF, a re-phrased fallback) reddens a vibecheck
42
+ const grepLine = yml
43
+ .split('\n')
44
+ .find((line) => line.includes('grep -qF "'));
45
+ expect(grepLine?.trim()).toMatchSnapshot('declastruct apply-gate grep');
46
+ });
47
+ });
48
+ });
49
+ });