@stackonward/cli 1.4.0 → 1.5.1

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 (55) hide show
  1. package/README.md +255 -0
  2. package/dist/index.js +14335 -603
  3. package/dist/index.js.map +1 -1
  4. package/dist/resources/deploy/ci/github/caller.yml +41 -0
  5. package/dist/resources/deploy/ci/onedev/import.yml +40 -0
  6. package/dist/resources/deploy/nginx/cache.conf +17 -0
  7. package/dist/resources/deploy/nginx/compression.conf +23 -0
  8. package/dist/resources/deploy/nginx/proxy.conf +15 -0
  9. package/dist/resources/deploy/profiles/go-service/compose.yaml +19 -0
  10. package/dist/resources/deploy/profiles/nuxt-node/Dockerfile +17 -0
  11. package/dist/resources/deploy/profiles/static-files/nginx/site.conf.template +55 -0
  12. package/dist/resources/deploy/profiles/static-nginx/Dockerfile +18 -0
  13. package/dist/resources/deploy/profiles/static-nginx/nginx/default.conf.template +28 -0
  14. package/dist/resources/deploy/targets/compose-host/deploy.config.example.json +114 -0
  15. package/dist/resources/deploy/traffic/nginx/stackonward-nginx-traffic +96 -0
  16. package/dist/resources/registry.json +30 -30
  17. package/dist/resources/templates/base/.claude/docs/architecture.md +4 -0
  18. package/dist/resources/templates/base/AGENTS.md +15 -0
  19. package/dist/resources/templates/base/CLAUDE.md +15 -0
  20. package/dist/resources/templates/go-backend/.dockerignore +25 -3
  21. package/dist/resources/templates/go-backend/deploy.config.json +26 -0
  22. package/dist/resources/templates/go-backend/docs/runtime-provenance.json +9 -6
  23. package/dist/resources/templates/go-backend/docs/source-provenance.json +33 -22
  24. package/dist/resources/templates/go-backend/internal/common/enums/register_locale.go +7 -0
  25. package/dist/resources/templates/go-backend/internal/common/enums/register_locale_test.go +30 -0
  26. package/dist/resources/templates/go-backend/internal/common/locale/locale.go +102 -76
  27. package/dist/resources/templates/go-backend/internal/common/locale/locale_test.go +168 -45
  28. package/dist/resources/templates/go-backend/internal/core/commandreplay/model.go +5 -5
  29. package/dist/resources/templates/go-backend/internal/core/commandreplay/persistence.go +20 -7
  30. package/dist/resources/templates/go-backend/internal/core/commandreplay/persistence_test.go +51 -22
  31. package/dist/resources/templates/go-backend/internal/core/commandreplay/repository.go +2 -2
  32. package/dist/resources/templates/go-backend/internal/core/commandreplay/service.go +13 -24
  33. package/dist/resources/templates/go-backend/internal/core/commandreplay/service_persistence_test.go +98 -13
  34. package/dist/resources/templates/go-backend/internal/core/commandreplay/service_test.go +61 -36
  35. package/dist/resources/templates/go-backend/internal/core/commandreplay/types.go +6 -6
  36. package/dist/resources/templates/go-backend/internal/core/integrationevent/config.go +24 -0
  37. package/dist/resources/templates/go-backend/internal/core/integrationevent/errors.go +53 -0
  38. package/dist/resources/templates/go-backend/internal/core/integrationevent/model.go +71 -0
  39. package/dist/resources/templates/go-backend/internal/core/integrationevent/persistence.go +193 -0
  40. package/dist/resources/templates/go-backend/internal/core/integrationevent/persistence_postgres_test.go +178 -0
  41. package/dist/resources/templates/go-backend/internal/core/integrationevent/persistence_test.go +168 -0
  42. package/dist/resources/templates/go-backend/internal/core/integrationevent/provider.go +16 -0
  43. package/dist/resources/templates/go-backend/internal/core/integrationevent/registry.go +69 -0
  44. package/dist/resources/templates/go-backend/internal/core/integrationevent/repository.go +17 -0
  45. package/dist/resources/templates/go-backend/internal/core/integrationevent/service.go +283 -0
  46. package/dist/resources/templates/go-backend/internal/core/integrationevent/service_test.go +433 -0
  47. package/dist/resources/templates/go-backend/internal/core/integrationevent/types.go +67 -0
  48. package/dist/resources/templates/go-backend/migrations/000001_infrastructure.down.sql +6 -0
  49. package/dist/resources/templates/go-backend/migrations/000001_infrastructure.up.sql +176 -16
  50. package/dist/resources/templates/go-backend/tests/infrastructure.sql +109 -6
  51. package/dist/resources/templates/nuxt/.claude/docs/stack.md +5 -1
  52. package/dist/resources/templates/nuxt/.dockerignore +19 -0
  53. package/dist/resources/templates/nuxt/deploy.config.json +27 -0
  54. package/dist/resources/templates/nuxt/package.json +8 -8
  55. package/package.json +5 -3
@@ -3,180 +3,180 @@
3
3
  "name": "@stackonward/api-client",
4
4
  "description": "Framework-agnostic HTTP transport core",
5
5
  "type": "npm",
6
- "version": "^0.0.2"
6
+ "version": "^0.0.3"
7
7
  },
8
8
  "@stackonward/analytics-core": {
9
9
  "name": "@stackonward/analytics-core",
10
10
  "description": "Provider-neutral analytics pipeline and browser autocapture",
11
11
  "type": "npm",
12
- "version": "^0.3.0"
12
+ "version": "^0.3.2"
13
13
  },
14
14
  "@stackonward/analytics-nuxt": {
15
15
  "name": "@stackonward/analytics-nuxt",
16
16
  "description": "Provider-neutral Nuxt analytics lifecycle",
17
17
  "type": "npm",
18
- "version": "^0.2.0"
18
+ "version": "^0.2.2"
19
19
  },
20
20
  "@stackonward/cli": {
21
21
  "name": "@stackonward/cli",
22
22
  "description": "StackOnward project and resource CLI",
23
23
  "type": "npm",
24
- "version": "^1.4.0"
24
+ "version": "^1.5.1"
25
25
  },
26
26
  "@stackonward/cms-client": {
27
27
  "name": "@stackonward/cms-client",
28
28
  "description": "Typed CMS delivery client",
29
29
  "type": "npm",
30
- "version": "^0.0.3"
30
+ "version": "^0.0.4"
31
31
  },
32
32
  "@stackonward/cms-nuxt": {
33
33
  "name": "@stackonward/cms-nuxt",
34
34
  "description": "Generic CMS Nuxt runtime",
35
35
  "type": "npm",
36
- "version": "^0.0.3"
36
+ "version": "^0.0.4"
37
37
  },
38
38
  "@stackonward/commitlint-config": {
39
39
  "name": "@stackonward/commitlint-config",
40
40
  "description": "Shared Conventional Commits configuration",
41
41
  "type": "npm",
42
- "version": "^0.1.0"
42
+ "version": "^0.1.1"
43
43
  },
44
44
  "@stackonward/composables": {
45
45
  "name": "@stackonward/composables",
46
46
  "description": "Headless Vue composables",
47
47
  "type": "npm",
48
- "version": "^0.0.1"
48
+ "version": "^0.0.2"
49
49
  },
50
50
  "@stackonward/device-fingerprint": {
51
51
  "name": "@stackonward/device-fingerprint",
52
52
  "description": "Provider-neutral browser fingerprint engine",
53
53
  "type": "npm",
54
- "version": "^0.0.1"
54
+ "version": "^0.0.2"
55
55
  },
56
56
  "@stackonward/eslint-config": {
57
57
  "name": "@stackonward/eslint-config",
58
58
  "description": "Shared ESLint configuration",
59
59
  "type": "npm",
60
- "version": "^1.0.0"
60
+ "version": "^1.0.1"
61
61
  },
62
62
  "@stackonward/file": {
63
63
  "name": "@stackonward/file",
64
64
  "description": "Browser file validation and upload primitives",
65
65
  "type": "npm",
66
- "version": "^0.0.1"
66
+ "version": "^0.0.2"
67
67
  },
68
68
  "@stackonward/google-tag-manager-nuxt": {
69
69
  "name": "@stackonward/google-tag-manager-nuxt",
70
70
  "description": "Consent-aware Google Tag Manager analytics integration for Nuxt",
71
71
  "type": "npm",
72
- "version": "^0.3.0"
72
+ "version": "^0.3.2"
73
73
  },
74
74
  "@stackonward/google-tag-manager": {
75
75
  "name": "@stackonward/google-tag-manager",
76
76
  "description": "Google Tag Manager transport and declarative container generator",
77
77
  "type": "npm",
78
- "version": "^0.2.0"
78
+ "version": "^0.2.2"
79
79
  },
80
80
  "@stackonward/identity-browser": {
81
81
  "name": "@stackonward/identity-browser",
82
82
  "description": "Browser client for opaque identity sessions",
83
83
  "type": "npm",
84
- "version": "^0.0.1"
84
+ "version": "^0.0.2"
85
85
  },
86
86
  "@stackonward/identity-session": {
87
87
  "name": "@stackonward/identity-session",
88
88
  "description": "Identity session contracts and server engine",
89
89
  "type": "npm",
90
- "version": "^0.0.1"
90
+ "version": "^0.0.2"
91
91
  },
92
92
  "@stackonward/image": {
93
93
  "name": "@stackonward/image",
94
94
  "description": "Browser image and CDN primitives",
95
95
  "type": "npm",
96
- "version": "^0.0.1"
96
+ "version": "^0.0.2"
97
97
  },
98
98
  "@stackonward/manifest-engine": {
99
99
  "name": "@stackonward/manifest-engine",
100
100
  "description": "Manifest compatibility filtering",
101
101
  "type": "npm",
102
- "version": "^0.0.1"
102
+ "version": "^0.0.2"
103
103
  },
104
104
  "@stackonward/nuxt-layer-base": {
105
105
  "name": "@stackonward/nuxt-layer-base",
106
106
  "description": "Nuxt transport, session, SEO, and i18n foundation",
107
107
  "type": "layer",
108
- "version": "^0.0.3"
108
+ "version": "^0.0.4"
109
109
  },
110
110
  "@stackonward/nuxt-site-shell": {
111
111
  "name": "@stackonward/nuxt-site-shell",
112
112
  "description": "Brand-free Nuxt product-site shell",
113
113
  "type": "layer",
114
- "version": "^0.3.0"
114
+ "version": "^0.3.1"
115
115
  },
116
116
  "@stackonward/onex-cms-client": {
117
117
  "name": "@stackonward/onex-cms-client",
118
118
  "description": "OneX CMS HTTP contract adapter",
119
119
  "type": "npm",
120
- "version": "^0.0.3"
120
+ "version": "^0.0.4"
121
121
  },
122
122
  "@stackonward/onex-device-context": {
123
123
  "name": "@stackonward/onex-device-context",
124
124
  "description": "OneX browser request-context adapter",
125
125
  "type": "npm",
126
- "version": "^0.0.1"
126
+ "version": "^0.0.2"
127
127
  },
128
128
  "@stackonward/onex-identity-nuxt": {
129
129
  "name": "@stackonward/onex-identity-nuxt",
130
130
  "description": "Nuxt BFF integration for OneX identity sessions",
131
131
  "type": "npm",
132
- "version": "^0.0.1"
132
+ "version": "^0.0.2"
133
133
  },
134
134
  "@stackonward/prettier-config": {
135
135
  "name": "@stackonward/prettier-config",
136
136
  "description": "Shared Prettier configuration",
137
137
  "type": "npm",
138
- "version": "^0.0.2"
138
+ "version": "^0.0.3"
139
139
  },
140
140
  "@stackonward/scheduler": {
141
141
  "name": "@stackonward/scheduler",
142
142
  "description": "Network-aware priority scheduler",
143
143
  "type": "npm",
144
- "version": "^0.0.1"
144
+ "version": "^0.0.2"
145
145
  },
146
146
  "@stackonward/section-core": {
147
147
  "name": "@stackonward/section-core",
148
148
  "description": "Section schema, registry, bridge, and token core",
149
149
  "type": "npm",
150
- "version": "^0.0.1"
150
+ "version": "^0.0.2"
151
151
  },
152
152
  "@stackonward/section-renderer-vue": {
153
153
  "name": "@stackonward/section-renderer-vue",
154
154
  "description": "Product-neutral Vue section renderer",
155
155
  "type": "npm",
156
- "version": "^0.0.1"
156
+ "version": "^0.0.2"
157
157
  },
158
158
  "@stackonward/server-boundary": {
159
159
  "name": "@stackonward/server-boundary",
160
160
  "description": "Server secret and request-topology boundaries",
161
161
  "type": "npm",
162
- "version": "^0.0.1"
162
+ "version": "^0.0.2"
163
163
  },
164
164
  "@stackonward/stylelint-config": {
165
165
  "name": "@stackonward/stylelint-config",
166
166
  "description": "Shared Stylelint configuration for CSS, Vue, and Tailwind CSS",
167
167
  "type": "npm",
168
- "version": "^0.1.0"
168
+ "version": "^0.1.1"
169
169
  },
170
170
  "@stackonward/tsconfig": {
171
171
  "name": "@stackonward/tsconfig",
172
172
  "description": "Shared TypeScript configurations",
173
173
  "type": "npm",
174
- "version": "^0.0.1"
174
+ "version": "^0.0.2"
175
175
  },
176
176
  "@stackonward/utils": {
177
177
  "name": "@stackonward/utils",
178
178
  "description": "Framework-agnostic pure utilities",
179
179
  "type": "npm",
180
- "version": "^0.0.1"
180
+ "version": "^0.0.2"
181
181
  }
182
182
  }
@@ -52,6 +52,10 @@ Use actual paths in [Stack](stack.md). Nuxt routes belong in `app/pages/`, serve
52
52
 
53
53
  Request/response types stay beside the service/API owner. Component props/emits stay with the component. A type moves to a shared owner only when callers share semantics, not merely field names.
54
54
 
55
+ Directories, modules and packages carry owner context; child files and symbols keep only the minimum responsibility. Within an owner use short names such as `Header`, `Config`, `Status`, `Menu`, `EventInput` and `items`; across owners add only the shortest qualifier, such as `SiteHeader`, `LocaleMenu`, `GTMOptions` or `GA4Event`. Never exchange one redundant prefix for another: `MarketingHeader` -> `PublicHeader` remains forbidden.
56
+
57
+ Directories, packages and ordinary TypeScript modules use kebab-case; Vue composables use `useX.ts`; Vue component files and types use PascalCase; variables/functions use camelCase; only fixed invariants use `UPPER_SNAKE_CASE`. Framework routes and endpoints keep framework syntax. Generic transforms use business-free responsibility names. External identifiers such as `purchase`, `login` and `gateway_*` remain unchanged. Vague standalone or catch-all names such as `helper`, `utils`, `common` and `manager` are forbidden; choose a precise owner and responsibility. `temp`, `new` and `final` naming residue is forbidden. Search owners, siblings and usages before naming or renaming; update all references and delete superseded names together.
58
+
55
59
  | Type | Owner |
56
60
  | -------------------------- | --------------------------------------------- |
57
61
  | HTTP request/response | API or server contract |
@@ -67,6 +67,21 @@ For non-trivial additions, declare `PLACEMENT/NAMING` (owner, name, kind, respon
67
67
 
68
68
  External calls, user-selectable alternatives, variable business policy, replaceable technology, standard extension points and multi-tenant behavior require `EXTENSIBILITY-INTENT`: signal, current and expected implementations, confidence, pattern, interface/configuration first, and exact files a second adapter would change. Otherwise state `NO-ABSTRACTION-JUSTIFICATION` and its refactor trigger.
69
69
 
70
+ ## Owner-Scoped Naming (CRITICAL)
71
+
72
+ Directories, modules and packages are namespaces. Child files and symbols **MUST** keep only the minimum responsibility-bearing name and **MUST NOT** repeat the owner or replace one redundant caller prefix with another (`MarketingHeader` -> `PublicHeader` remains forbidden).
73
+
74
+ - Inside an explicit owner, use short names such as `Header`, `Config`, `Status`, `Menu`, `EventInput` or `items`; across owners, add only the shortest required qualifier, such as `SiteHeader`, `LocaleMenu`, `GTMOptions` or `GA4Event`.
75
+ - Names describe responsibility, never the first caller, page, brand, task or conversation. Pure transforms use business-free names; business and protocol nouns remain only when they enforce that contract.
76
+ - Directories, packages and ordinary TypeScript modules use kebab-case; Vue composables use `useX.ts`; Vue component files and types use PascalCase; variables and functions use camelCase; only true fixed invariants use UPPER_SNAKE_CASE. Framework route and endpoint files follow framework syntax.
77
+ - External or business-owned identifiers such as `purchase`, `login` and `gateway_*` are semantic contracts, not code-name redundancy, and remain unchanged.
78
+ - Vague standalone or catch-all names such as `helper`, `utils`, `common` and `manager` are forbidden; choose a precise owner and responsibility. `temp`, `new` and `final` naming residue is forbidden. Search owners, siblings and usages before naming or renaming; update all references and delete superseded names together.
79
+ - Nuxt component directories remain namespaces: preserve default path-aware auto-naming and never set global `pathPrefix: false`. Local explicit imports may use the short name; cross-owner and global auto-imports use the path qualifier.
80
+
81
+ ✅ `analytics/events.ts::EventInput`, `components/site/Header.vue` -> `SiteHeader`, `useTracking`, `GTMOptions`, `GA4Event`
82
+
83
+ ❌ `types/marketing-analytics.ts`, `MarketingHeader`, `PublicHeader`, `GoogleTagManagerOptions`
84
+
70
85
  ---
71
86
 
72
87
  # AI Execution Standard
@@ -67,6 +67,21 @@ For non-trivial additions, declare `PLACEMENT/NAMING` (owner, name, kind, respon
67
67
 
68
68
  External calls, user-selectable alternatives, variable business policy, replaceable technology, standard extension points and multi-tenant behavior require `EXTENSIBILITY-INTENT`: signal, current and expected implementations, confidence, pattern, interface/configuration first, and exact files a second adapter would change. Otherwise state `NO-ABSTRACTION-JUSTIFICATION` and its refactor trigger.
69
69
 
70
+ ## Owner-Scoped Naming (CRITICAL)
71
+
72
+ Directories, modules and packages are namespaces. Child files and symbols **MUST** keep only the minimum responsibility-bearing name and **MUST NOT** repeat the owner or replace one redundant caller prefix with another (`MarketingHeader` -> `PublicHeader` remains forbidden).
73
+
74
+ - Inside an explicit owner, use short names such as `Header`, `Config`, `Status`, `Menu`, `EventInput` or `items`; across owners, add only the shortest required qualifier, such as `SiteHeader`, `LocaleMenu`, `GTMOptions` or `GA4Event`.
75
+ - Names describe responsibility, never the first caller, page, brand, task or conversation. Pure transforms use business-free names; business and protocol nouns remain only when they enforce that contract.
76
+ - Directories, packages and ordinary TypeScript modules use kebab-case; Vue composables use `useX.ts`; Vue component files and types use PascalCase; variables and functions use camelCase; only true fixed invariants use UPPER_SNAKE_CASE. Framework route and endpoint files follow framework syntax.
77
+ - External or business-owned identifiers such as `purchase`, `login` and `gateway_*` are semantic contracts, not code-name redundancy, and remain unchanged.
78
+ - Vague standalone or catch-all names such as `helper`, `utils`, `common` and `manager` are forbidden; choose a precise owner and responsibility. `temp`, `new` and `final` naming residue is forbidden. Search owners, siblings and usages before naming or renaming; update all references and delete superseded names together.
79
+ - Nuxt component directories remain namespaces: preserve default path-aware auto-naming and never set global `pathPrefix: false`. Local explicit imports may use the short name; cross-owner and global auto-imports use the path qualifier.
80
+
81
+ ✅ `analytics/events.ts::EventInput`, `components/site/Header.vue` -> `SiteHeader`, `useTracking`, `GTMOptions`, `GA4Event`
82
+
83
+ ❌ `types/marketing-analytics.ts`, `MarketingHeader`, `PublicHeader`, `GoogleTagManagerOptions`
84
+
70
85
  ---
71
86
 
72
87
  # AI Execution Standard
@@ -1,6 +1,28 @@
1
1
  .git
2
+ .github
3
+ .claude
4
+ .husky
5
+ .idea
6
+ .vscode
2
7
  .env
3
8
  .env.*
4
- bin
5
- coverage.*
6
- node_modules
9
+ .npmrc
10
+ *.key
11
+ *.pem
12
+
13
+ bin/
14
+ coverage/
15
+ coverage.out
16
+ coverage.html
17
+ node_modules/
18
+ **/node_modules/
19
+ tmp/
20
+
21
+ *.log
22
+ .DS_Store
23
+
24
+ AGENTS.md
25
+ CLAUDE.md
26
+ README.md
27
+ deploy.config.json
28
+ docs/
@@ -0,0 +1,26 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "{{projectName}}",
4
+ "profile": "go-service",
5
+ "source": {
6
+ "verify": {
7
+ "executable": "make",
8
+ "args": ["check"]
9
+ },
10
+ "build": {
11
+ "executable": "make",
12
+ "args": ["build"]
13
+ }
14
+ },
15
+ "image": {
16
+ "dockerfile": "Dockerfile",
17
+ "context": ".",
18
+ "repository": "{{projectName}}",
19
+ "platform": "linux/amd64"
20
+ },
21
+ "environments": {
22
+ "production": {
23
+ "target": "registry-only"
24
+ }
25
+ }
26
+ }
@@ -112,8 +112,9 @@
112
112
  },
113
113
  {
114
114
  "target": "migrations/000001_infrastructure.up.sql",
115
- "target_template_sha256": "7805df78ce83bb5e7c7bdf8452b4da904d85c9251e25fa37cc24a87262b2d179",
116
- "transformation": "Extract seven generic baseline tables and complete command replay table as eight infrastructure owners, preserving fields, defaults, sequences, primary/unique/check constraints, indexes and comments. Keep four log partition parents and add default partitions. Preserve delivery identity and schema-version immutable triggers plus operation-log finalization guard. Omit platform event-catalog schema binding trigger; product producers assign their own schema_version without platform table queries.",
115
+ "target_template_sha256": "fe971c4bd743fda85d557c5f9634dae6347f5032414cb24d6e3f85dc5468457b",
116
+ "transformation": "source-adapted",
117
+ "details": "Defines eleven business-neutral infrastructure owner tables: seven retained OneX baseline tables, command replay with mandatory principal-scoped five-field identity, and three StackOnward-owned integration-event inbox, subscriber-receipt and aggregate-checkpoint tables. The three integration-event tables and their transition guards are not attributed to the listed OneX origins. Four log partition parents retain default partitions; outbox identity/schema immutability and operation-log finalization guards remain. The platform event-catalog binding trigger stays excluded because independent producers assign schema_version without platform database queries.",
117
118
  "origins": [
118
119
  {
119
120
  "source": "backend/migrations/000001_platform_baseline.up.sql",
@@ -127,8 +128,9 @@
127
128
  },
128
129
  {
129
130
  "target": "migrations/000001_infrastructure.down.sql",
130
- "target_template_sha256": "142598fb71a4e4b9586455495064ddaf62d0c67c3ffd95d7fa7c162b0a9abaca",
131
- "transformation": "Reverse only the eight product infrastructure owners, their dependent partitions/sequences and three retained guard functions. Keep shared pgcrypto extension.",
131
+ "target_template_sha256": "7e7b9e9682128e98eeee02cbbf4eafd4df255d67727896669e12244b76bc4cfc",
132
+ "transformation": "source-adapted",
133
+ "details": "Reverses the eleven business-neutral infrastructure owner tables and six associated guard functions; dependent partitions, triggers and sequences are removed through table cascade. The three integration-event tables and their guards are StackOnward-owned rather than derived from the listed OneX origins. The shared pgcrypto extension remains installed.",
132
134
  "origins": [
133
135
  {
134
136
  "source": "backend/migrations/000001_platform_baseline.up.sql",
@@ -160,8 +162,9 @@
160
162
  },
161
163
  {
162
164
  "target": "tests/infrastructure.sql",
163
- "target_template_sha256": "c7d445af3c6404ea664018f41111c93abaef606f6925f2fbd0b0ee9d6bfacc61",
164
- "transformation": "Eight-table presence, command replay unique/state constraints, outbox identity/schema immutability and operation-log append/finalization protection.",
165
+ "target_template_sha256": "342171c4af1ba35ab174439cb3673489b48f4e0073fa91d24939c9251e88f0a7",
166
+ "transformation": "source-adapted",
167
+ "details": "Template-owned verification asserts the exact eleven business-neutral infrastructure owner tables, five-field principal-scoped command replay uniqueness and required principal values, integration-event global identity and append-only storage, subscriber receipt isolation and terminal transitions, aggregate checkpoint source isolation and contiguous advancement, plus retained outbox and operation-log invariants.",
165
168
  "origins": []
166
169
  }
167
170
  ],
@@ -430,9 +430,10 @@
430
430
  {
431
431
  "source": "backend/internal/core/commandreplay/model.go",
432
432
  "target": "internal/core/commandreplay/model.go",
433
- "transformation": "module/import namespace only",
433
+ "transformation": "source-adapted",
434
+ "details": "Makes principal_type and principal_ref mandatory members of command replay identity. The database unique key is the five-field tuple (namespace, principal_type, principal_ref, command_scope, idempotency_key), isolating identical idempotency keys across trusted principals.",
434
435
  "source_sha256": "e610b620e96cabafad53ca1265455bd7fececcf6db73783beebe26bf6adf0c49",
435
- "target_template_sha256": "91f3fdddc489ce7249cd997584d1f61f06cb29a584523fcf30ac68c4fd0035aa"
436
+ "target_template_sha256": "537673b5ada9d6f8e375d76e65e76764162622f2867485e25b858cf15c8da823"
436
437
  },
437
438
  {
438
439
  "source": "backend/internal/core/commandreplay/model_test.go",
@@ -451,16 +452,18 @@
451
452
  {
452
453
  "source": "backend/internal/core/commandreplay/persistence.go",
453
454
  "target": "internal/core/commandreplay/persistence.go",
454
- "transformation": "module/import namespace only",
455
+ "transformation": "source-adapted",
456
+ "details": "Scopes repository lookup, conflict handling and the length-prefixed PostgreSQL advisory lock key by the five-field tuple (namespace, principal_type, principal_ref, command_scope, idempotency_key).",
455
457
  "source_sha256": "6b495eb7d886dea43f50fb5457c99450cf75ee3180ab138dc4b6f71d5e912308",
456
- "target_template_sha256": "fd8e034952709522d842dce4079f86ec4a2f8d499ea54f7d60c00758fca07784"
458
+ "target_template_sha256": "e335b9085acec0a83789e4e115ab0a04e2a6db8bae97384ab81a9d78e39debac"
457
459
  },
458
460
  {
459
461
  "source": "backend/internal/core/commandreplay/persistence_test.go",
460
462
  "target": "internal/core/commandreplay/persistence_test.go",
461
- "transformation": "module/import namespace only",
463
+ "transformation": "source-adapted",
464
+ "details": "Verifies database lookup, conflict targets and advisory locks use the complete five-field principal scope and do not collide across distinct principals.",
462
465
  "source_sha256": "58228cdb9f0fcf22da36e620d565d810fe3c618e061a68e61a140da44bacac3b",
463
- "target_template_sha256": "1cff76682460690e89b5c80f58f0422c02cfb1319ed079447a2c9104e9104107"
466
+ "target_template_sha256": "0947eab5e124ebd4168a78cc3a2ed9957462a6fed1d3967c4672f590644db760"
464
467
  },
465
468
  {
466
469
  "source": "backend/internal/core/commandreplay/provider.go",
@@ -472,37 +475,42 @@
472
475
  {
473
476
  "source": "backend/internal/core/commandreplay/repository.go",
474
477
  "target": "internal/core/commandreplay/repository.go",
475
- "transformation": "module/import namespace only",
478
+ "transformation": "source-adapted",
479
+ "details": "Extends replay lookup and scope-lock contracts with required principal type and principal reference so every repository operation addresses the same five-field identity.",
476
480
  "source_sha256": "90a0e737c8df5f65e6f1897c82b3087ef35a6cbf1e46bd4ca291ce18a686610f",
477
- "target_template_sha256": "90a0e737c8df5f65e6f1897c82b3087ef35a6cbf1e46bd4ca291ce18a686610f"
481
+ "target_template_sha256": "4e52704849a4bbc1842e812d6a6244d0860f23a73a92ae7b27694cf1fa2bc617"
478
482
  },
479
483
  {
480
484
  "source": "backend/internal/core/commandreplay/service.go",
481
485
  "target": "internal/core/commandreplay/service.go",
482
- "transformation": "module/import namespace only",
486
+ "transformation": "source-adapted",
487
+ "details": "Requires trusted principal type and reference at the service boundary and propagates the complete five-field scope through lock, lookup, create and duplicate-reload paths.",
483
488
  "source_sha256": "e6773b4fa604133333ca193d73c7ede037abf7d00df2293df4618e22cd2b616c",
484
- "target_template_sha256": "6a80ef4df446a6bb10da4972890fdbd166d879bd4a01368f9605a28e781b197e"
489
+ "target_template_sha256": "266dd3787265091404af83be76c26d887b5115abddaf97f3ce3b76b3c456b093"
485
490
  },
486
491
  {
487
492
  "source": "backend/internal/core/commandreplay/service_persistence_test.go",
488
493
  "target": "internal/core/commandreplay/service_persistence_test.go",
489
- "transformation": "module/import namespace only",
494
+ "transformation": "source-adapted",
495
+ "details": "Verifies persisted replay isolation for identical command and idempotency values owned by different trusted principals, including concurrent acquisition behavior.",
490
496
  "source_sha256": "1e5e2fd1b720f069f926c5cfc009e243606b0e87bccd6773a71ee53cc8b7e02b",
491
- "target_template_sha256": "05b14b08732cae67d54093953936d1531b75bc2ee2b3aa86e48c2bbacacb9e0c"
497
+ "target_template_sha256": "47ecb12805fe8efa1d59cbcf22bc03ae971f8bb2725a418d2cfc416b27785a19"
492
498
  },
493
499
  {
494
500
  "source": "backend/internal/core/commandreplay/service_test.go",
495
501
  "target": "internal/core/commandreplay/service_test.go",
496
- "transformation": "module/import namespace only",
502
+ "transformation": "source-adapted",
503
+ "details": "Verifies principal fields are mandatory and that replay, conflict and external-lease behavior consistently use the five-field principal scope.",
497
504
  "source_sha256": "f022ef1d41d9d296af275ef335ac87431c5f55307d19c7d9252a1b7e3f71116b",
498
- "target_template_sha256": "2b6cdf86e4bf1020552a1009ee1500e68e1b1804f19ddd5f35caa53688cf9051"
505
+ "target_template_sha256": "24ff2e89c58fe24447051fac0b03000a6e608317366a5ccbe73761570cde47af"
499
506
  },
500
507
  {
501
508
  "source": "backend/internal/core/commandreplay/types.go",
502
509
  "target": "internal/core/commandreplay/types.go",
503
- "transformation": "module/import namespace only",
510
+ "transformation": "source-adapted",
511
+ "details": "Makes principal type and principal reference required request and normalized values because both fields participate in command replay identity.",
504
512
  "source_sha256": "14c038c1f4cf4ff076e0b71727276604550dd62557e7e2c72b8e4d38aa179c04",
505
- "target_template_sha256": "51b67144ae463a38ecf4b01729f91f130f4b0deccc60b601f51981779be84686"
513
+ "target_template_sha256": "53c7278ebea7ed97ef2817c30feb8a60846336b8d79886d08a046396d81b36fa"
506
514
  },
507
515
  {
508
516
  "source": "backend/internal/core/config/config.go",
@@ -2175,9 +2183,10 @@
2175
2183
  {
2176
2184
  "source": "backend/internal/common/enums/register_locale.go",
2177
2185
  "target": "internal/common/enums/register_locale.go",
2178
- "transformation": "module/import namespace only",
2186
+ "transformation": "source-adapted",
2187
+ "details": "Expands business-neutral locale presentation metadata to the exact 19 internal short codes exposed by the locale Resource Bundle; no alias codes are registered.",
2179
2188
  "source_sha256": "3334a68915c6a6c10b5ff1e36bc523e4111a962b451779165cfb70c0e6e4837d",
2180
- "target_template_sha256": "1210020d94c87af0a78146a6f782352a87d25a9581514d6f8c413f64e6c62f98"
2189
+ "target_template_sha256": "62ab6b920cd7e394c99dd0855bc0479e70183bc0f631e0c2e5a83826791a694a"
2181
2190
  },
2182
2191
  {
2183
2192
  "source": "backend/internal/common/enums/register_mailbox.go",
@@ -2546,16 +2555,18 @@
2546
2555
  {
2547
2556
  "source": "backend/internal/common/locale/locale.go",
2548
2557
  "target": "internal/common/locale/locale.go",
2549
- "transformation": "module/import namespace only",
2558
+ "transformation": "source-adapted",
2559
+ "details": "Replaces permissive case-folded aliases and fallback normalization with one exact 19-entry Resource Bundle mapping between canonical external tags and internal short codes. It provides deterministic round trips and text direction, marks only Arabic as RTL, and rejects unknown, non-canonical or colliding locale keys.",
2550
2560
  "source_sha256": "17b5db8f7f0d0667cc88e37351435214e04ad98fe214b22c1c857e77ef7cb02d",
2551
- "target_template_sha256": "17b5db8f7f0d0667cc88e37351435214e04ad98fe214b22c1c857e77ef7cb02d"
2561
+ "target_template_sha256": "bafde441fe8a3d7d0e6db8c413a9d562030cfb2145357fc2406b6d831b2f77a5"
2552
2562
  },
2553
2563
  {
2554
2564
  "source": "backend/internal/common/locale/locale_test.go",
2555
2565
  "target": "internal/common/locale/locale_test.go",
2556
- "transformation": "module/import namespace only",
2566
+ "transformation": "source-adapted",
2567
+ "details": "Verifies all 19 canonical external-tag and short-code round trips and directions, plus fail-closed rejection of aliases, case variants, whitespace, punctuation, unknown keys, blank text and duplicate canonical targets.",
2557
2568
  "source_sha256": "67c1b6b955603c3797d8231b916ce5ee3f55c7463a600f6bc931a9e2ad706cbc",
2558
- "target_template_sha256": "67c1b6b955603c3797d8231b916ce5ee3f55c7463a600f6bc931a9e2ad706cbc"
2569
+ "target_template_sha256": "5f76e478cdaa12a2e6bcea3ddb8501e7473530efff0f628d4f77d82364809946"
2559
2570
  },
2560
2571
  {
2561
2572
  "source": "backend/internal/common/mediaref/mediaref.go",
@@ -18,8 +18,15 @@ var localeEnumMetadataByCode = map[string]localeEnumMetadata{
18
18
  "ja": {label: "日本語", color: "magenta"},
19
19
  "ko": {label: "한국어", color: "green"},
20
20
  "pt": {label: "Português", color: "orange"},
21
+ "ru": {label: "Русский", color: "purple"},
21
22
  "hi": {label: "हिंदी", color: "lime"},
22
23
  "ar": {label: "العربية", color: "volcano"},
24
+ "id": {label: "Bahasa Indonesia", color: "blue"},
25
+ "th": {label: "ไทย", color: "green"},
26
+ "vi": {label: "Tiếng Việt", color: "cyan"},
27
+ "tr": {label: "Türkçe", color: "red"},
28
+ "pl": {label: "Polski", color: "magenta"},
29
+ "nl": {label: "Nederlands", color: "geekblue"},
23
30
  }
24
31
 
25
32
  func commonLocaleEnumItems() []EnumItem {
@@ -0,0 +1,30 @@
1
+ package enums
2
+
3
+ import (
4
+ "reflect"
5
+ "testing"
6
+
7
+ commonlocale "{{module}}/internal/common/locale"
8
+ )
9
+
10
+ func TestCommonLocaleEnumItemsCoverSupportedCodes(t *testing.T) {
11
+ items := commonLocaleEnumItems()
12
+ wantCodes := commonlocale.SupportedCodes()
13
+ if len(items) != len(wantCodes) {
14
+ t.Fatalf("commonLocaleEnumItems() count = %d, want %d", len(items), len(wantCodes))
15
+ }
16
+
17
+ gotCodes := make([]string, 0, len(items))
18
+ for _, item := range items {
19
+ gotCodes = append(gotCodes, item.Value)
20
+ if item.Label == "" {
21
+ t.Errorf("locale %q has empty label", item.Value)
22
+ }
23
+ if item.Color == "" {
24
+ t.Errorf("locale %q has empty color", item.Value)
25
+ }
26
+ }
27
+ if !reflect.DeepEqual(gotCodes, wantCodes) {
28
+ t.Fatalf("commonLocaleEnumItems() values = %#v, want %#v", gotCodes, wantCodes)
29
+ }
30
+ }