Repository navigation
Closed
Labels
Description
Part of #4839 (split from it in task TALE-176).
Problem
#4839 addendum 4, defect 8, and addendum 5, defect 12. Paths are under tools/cli/src/.
| # | Defect | Code | What the operator sees |
|---|---|---|---|
| 8 | A schema error names no field | operationalFailure turns every z.ZodError into the caller's fixed sentence: commands/operational-failure.ts:36 if (error instanceof z.ZodError) return preconditionError(fallback.schema);. The managed deployment commands pass "Deployment input does not match its schema." (commands/deploy/managed.ts:29-33). The zod error isn't attached as a cause (utils/fail.ts:50). Specs are parsed at lib/deployment/prepare.ts:34-36 and lib/deployment/model.ts:535-536, bundle manifests at lib/deployment/bundle.ts:128 |
A typo in a deployment spec or a bundle manifest gives that one sentence and exit code 3, with no path, field or expected type. The operator has to diff the file against the docs by hand |
| 12 | A mistyped bundle directory or a missing deployment.json isn't named |
lib/deployment/bundle.ts:120 const rootInfo = await lstat(root); and :123 const info = await lstat(join(root, 'deployment.json')); (Node's lstat, :12) run before the explicit checks (:121-122, :124-126). For a path that doesn't exist, lstat throws Node's ENOENT, which isn't a CliError, ConfigError or ZodError. So operationalFailure replaces it with the caller's fixed summary: operational-failure.ts:37 return preconditionError(fallback.summary, fallback.next);. The call path is commands/deploy/index.ts:101, managed.ts:121, lib/deployment/apply.ts:577, bundle.ts:189 |
tale deploy --bundle ./bundel reports "Deployment failed. Review the source pins, paths, permissions and retained recovery receipts." (managed.ts:32), exit code 3. The explicit checks right after it, "Deployment bundle must be a regular directory." and "Deployment manifest is not a bounded regular file.", would have said what's wrong, but they never run |
Notes, all at 29e9445:
- feat: add file attachment support for chat agent with document parsing #12: without
--yesor--dry-run,deploy --bundleasks for consent before it reads the bundle (managed.ts:112-120). In a non-interactive shell it prints only "Aborted." (bug(cli): digit-led project names can never deploy, --host rewrites .env even on --dry-run, and the Windows installer closes the session on error #4839 addendum 3, defect 6).tale deploy verify-bundle --bundle ./bundel(managed.ts:99-100) has no prompt and reaches the fixed summary. - feat: add file attachment support for chat agent with document parsing #12:
deploy accept(commands/deploy/accept.ts:49, thenlib/deployment/acceptance.ts:166) anddeploy export-client(commands/deploy/export-client.ts:51, thenlib/deployment/client-export.ts:303) share the path and the summary.deploy provision --bundle(commands/deploy/provision.ts:134) ends atprovision.ts:326instead, with "Native instance provisioning failed." and exit code 5. - support pptx,docx and reduce envs #8:
operational-failure.ts:36is shared.commands/config/releases.ts:104andcommands/config/platform.ts:177pass their own schema sentences, so a change there reaches theconfigcommands too. - Found while verifying, not in bug(cli): digit-led project names can never deploy, --host rewrites .env even on --dry-run, and the Windows installer closes the session on error #4839:
deploy preparehas the same gap for its spec file. A missing--specfile (readFile,prepare.ts:36) or invalid JSON (lib/deployment/declaration-text.ts:19return JSON.parse(text);) also ends in the fixed summary. Invalid YAML gets its own sentence (declaration-text.ts:21).
Expected
- support pptx,docx and reduce envs #8: list the zod issue paths and expected types, without received values.
- feat: add file attachment support for chat agent with document parsing #12: catch
ENOENTandENOTDIRaround the twolstatcalls and answer with the existing precondition sentences, naming the path.
Regression:
- support pptx,docx and reduce envs #8: in
commands/deploy/managed.test.ts(describePosix('managed deployment failures',:78), run a spec that misses a required field throughmanagedResult('deploy prepare', …), as thefailure()helper does (:65-67). The summary must name that field's path. At 29e9445 it is only "Deployment input does not match its schema.".commands/operational-failure.test.ts:55pins today's sentence (:59summary: fallback.schema,) and has to change. - feat: add file attachment support for chat agent with document parsing #12:
verifyDeploymentBundleon a missing directory, and on a bundle withoutdeployment.json, must refuse with a precondition error that names the path. Extend the bundle refusals inlib/deployment/inputs.test.ts:341-342, or theverify-bundleCLI test attests/deployment.test.ts:265, which expects exit code 3 for a corrupt bundle (:316-323). At 29e9445 both cases throw Node'sENOENT, and the command shows the fixed summary. commands/deploy/managed.test.ts:109("an unexpected failure keeps the fixed line, never its message") must keep passing.
Severity and owner
- Severity: not stated in bug(cli): digit-led project names can never deploy, --host rewrites .env even on --dry-run, and the Windows installer closes the session on error #4839 (addenda 4 and 5 give none).
- Owner: CLI (managed deployment).
- Evidence: static reading at
train29e9445, same atfeature-train12625af; nothing was run. The cited paths are unchanged attrain1ae4a95 andfeature-train2334ceb. - Related: none named in the sources. Without
--yes, feat: add file attachment support for chat agent with document parsing #12 ends in the bare "Aborted." of bug(cli): digit-led project names can never deploy, --host rewrites .env even on --dry-run, and the Windows installer closes the session on error #4839 addendum 3, defect 6 (bug(cli): a prompt with no terminal prints only "Aborted."; deploy provision needs --yes #5171).
Activity
fix(cli): name the field or path a managed deployment refuses
docs: amend the v0.5.95 release notes
docs: amend the v0.5.95 release notes