Skip to content

fix(sdk): clean up the package template - #3597

Open
MattDHill wants to merge 1 commit into
masterfrom
docs/sync-package-template-sdk-2.0
Open

fix(sdk): clean up the package template#3597
MattDHill wants to merge 1 commit into
masterfrom
docs/sync-package-template-sdk-2.0

Conversation

@MattDHill

Copy link
Copy Markdown
Member

s9pk init-package copies projects/start-sdk/docs/package-template/ verbatim, so anything stale in it ships into every new service package. Two things were.

alerts

2.0.0 removed the manifest field with no compatibility alias, but the template kept scaffolding it:

alerts: { install: null, update: null, uninstall: null, restore: null, start: null, stop: null },

It survives tsc because setupManifest infers its parameter type from the argument rather than rejecting the key as an excess property — which is why it went unnoticed. Every package scaffolded since 2.0.0 carries a dead field, and a packager reading the scaffold has no way to tell it was removed.

The hello-world guard job

release.yml and tagAndRelease.yml each opened with a job that read the package id out of startos/manifest/index.ts so the release could skip itself when that id was hello-world:

guard:
  runs-on: ubuntu-latest
  outputs: { id: "${{ steps.read.outputs.id }}" }
  ...
release:
  needs: guard
  if: needs.guard.outputs.id != 'hello-world'

That only ever protected the template's own lineage from publishing under hello-world. In a real package the condition is always true, so it buys nothing and costs an extra checkout job on every release. hello-world itself dropped it in ed0dca2; the template didn't follow.

No package in either registry has it — 0 of 258 release.yml / tagAndRelease.yml files across start9-registry, community-registry, needs-review and no-registry, multi-branch worktrees included. It exists only here.

Mirrors

Per the root AGENTS.md § Coupled changes, the template's workflows are one of three hand-maintained mirrors, alongside the reusable CI in .github/workflows/ and the examples in project-structure.md. Both of those were already clean — the template was the only copy that had drifted — so this also drops the commented-out FREE_DISK_SPACE input it carried in all three. Its workflows are now byte-identical to hello-world-startos's.

Notes

  • No SDK source change; lib/ is untouched.
  • 2.0.10 has no start-sdk/v2.0.10 origin tag, so the changelog entry goes under the existing unreleased heading.
  • Found while rebuilding dojo-startos on SDK 2.0 from a fresh scaffold.

🤖 Generated with Claude Code

The template scaffolds every new service package verbatim and had drifted
from what the SDK and the fleet expect.

alerts was removed from the manifest in 2.0.0 with no compatibility alias,
but the template kept emitting it — and it survives tsc, because
setupManifest infers its parameter type from the argument rather than
rejecting the key as an excess property. So every package scaffolded since
carries a dead field.

The guard job in release.yml and tagAndRelease.yml read the package id out
of the manifest so the release could skip itself when that id was
hello-world. It only ever protected the template's own lineage; in a real
package the condition is always true, so it bought nothing and cost an
extra checkout job per release. hello-world dropped it in ed0dca2 and the
template didn't follow. No package in either registry has it — 0 of 258
release and tagAndRelease workflows across all four service trees,
worktrees included.

The template's workflows are one of three hand-maintained mirrors, with
the reusable CI in .github/workflows/ and the examples in
project-structure.md. Both were already clean, so this also drops the
commented-out FREE_DISK_SPACE input the template carried in all three,
making its workflows byte-identical to hello-world's.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant