Commit a0fa3a5
Two coupled bugs made `meta init --refresh-docs` unusable on a multi-module
monorepo:
1. `--force` cancelled the refresh-only short-circuit. The early return was
gated on `!opts.force`, so `--refresh-docs --force` fell through to the FULL
project scaffold — re-creating metaobjects/, metaobjects.config.ts,
codegen/generators/, config.json, package.meta.json (and scaffolding into
sibling packages). Refresh now short-circuits whenever the project exists,
regardless of --force; --force on this path instead means "overwrite
hand-edited docs in place rather than writing the .new sidecar".
2. Refresh re-detected the stack from a root-only probe, discarding the correct
persisted stack. On a monorepo the client deps live in a sibling package and
a Maven-built Kotlin server has no gradle file, so root detection yields
"java server, no client" and the refreshed docs regress (and shrink, since a
narrower stack assembles fewer reference fragments). The correct stack is
already persisted in .metaobjects/.agent-context.json; refresh now reuses it
(precedence: explicit --server/--client > persisted manifest > detection).
TS-CLI-only: meta init / refresh / stack-detection are the Node CLI's; the other
ports only expose agent-docs (which redirects to the Node CLI). No cross-port
change and no conformance fixture — this is CLI scaffolding, not metamodel
behavior. Adds regression tests: --refresh-docs --force writes docs only (no
re-scaffold) and preserves a persisted multi-package stack.
Claude-Session: https://claude.ai/code/session_01Ew1XfYSbEAezxjs9opynAe
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent eed48d9 commit a0fa3a5
2 files changed
Lines changed: 93 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
159 | 182 | | |
160 | 183 | | |
161 | | - | |
| 184 | + | |
| 185 | + | |
162 | 186 | | |
163 | 187 | | |
164 | 188 | | |
165 | | - | |
166 | 189 | | |
167 | 190 | | |
168 | 191 | | |
| |||
172 | 195 | | |
173 | 196 | | |
174 | 197 | | |
175 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
176 | 209 | | |
177 | 210 | | |
178 | 211 | | |
179 | 212 | | |
180 | 213 | | |
181 | | - | |
| 214 | + | |
182 | 215 | | |
183 | 216 | | |
184 | 217 | | |
| |||
255 | 288 | | |
256 | 289 | | |
257 | 290 | | |
258 | | - | |
259 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
260 | 299 | | |
261 | 300 | | |
262 | 301 | | |
| |||
Lines changed: 47 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
74 | 121 | | |
75 | 122 | | |
76 | 123 | | |
| |||
0 commit comments