Skip to content

fix: Teams-App-Package-Template am Plugin-Ingest akzeptieren (scoped .template) - #880

Merged
Weegy merged 1 commit into
mainfrom
fix/appPackage-template-ingest
Aug 26, 2026
Merged

fix: Teams-App-Package-Template am Plugin-Ingest akzeptieren (scoped .template)#880
Weegy merged 1 commit into
mainfrom
fix/appPackage-template-ingest

Conversation

@Weegy

@Weegy Weegy commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Marcels Store-Update auf @omadia/channel-teams 0.21.0 scheitert auf der Fly-Instanz (v0.136.1):

entry appPackage/manifest.json.template has a disallowed extension (.template)

Ursache — ein Dreiecks-Konflikt, alle drei Teile bei uns

Rolle Ort Sagt
Producer channel-teams 0.21.0 ZIP (Hub) liefert appPackage/manifest.json.template — gegen die Central Directory des publizierten Artefakts verifiziert
Gatekeeper middleware/src/plugins/zipExtractor.ts:20 EXTENSION_ALLOWLIST ist deny-by-default, kein .template → Ingest bricht ab
Consumer middleware/src/services/teamsAppPackageAssets.ts:193 liest per readFile exakt appPackage/manifest.json.template und verlangt es namentlich

Die Agent-Factory (#860 W1a) kann ihr App-Package-Template damit nirgends installieren — das Paket kommt am eigenen Gate nicht vorbei. In Prod fiel es nicht auf, weil der Pfad ohne Identity-Rows inert ist: der erste echte Install-Versuch war Marcels Klick.

Fix

.template wird akzeptiert, scoped auf appPackage/ — dieselbe Konstruktion, die .woff2 unterhalb von ui/ schon nutzt (UI_BUNDLE_EXTENSIONS + UI_BUNDLE_PATH).

Scoped statt global, weil die Endung nichts über den Inhalt sagt: die Datei wird als Text gelesen und nie geladen oder ausgeführt — damit gehört sie in die Klasse der ohnehin erlaubten .txt / .md, aber nur ein Verzeichnis hat einen Grund, sie zu tragen.

Warum kein Rename (manifest.template.json wäre erlaubt gewesen): der Consumer-Dateiname steckt als Konstante im laufenden Release. Ein umbenanntes Plugin macht die Factory genau so lange blind, bis auch die Middleware nachgezogen ist — Reihenfolgezwang für null Sicherheitsgewinn, und das publizierte ZIP wäre ungültig geworden.

Der eigentliche Prozessfehler

Nichts hat je das publizierte Paket-Layout gegen das Ingest-Gate gehalten: npm run package prüft, dass das ZIP baut, der Drift-Guard prüft Versionen — aber niemand fragt „kommt dieses ZIP am Extractor vorbei". pluginPackageTemplateAllowlist.test.ts schickt jetzt das echte appPackage/-Layout (manifest.json.template, color.png, outline.png, README.md) durch extractZipToDir und pinnt das Scoping in beide Richtungen: Root-Level und Namensvetter-Verzeichnisse (appPackages/) werden weiterhin abgelehnt, ein Wrapper-Verzeichnis (npm-pack-Stil) wird toleriert, ein .sh in appPackage/ bleibt abgelehnt, und ein expliziter extensionAllowlist-Override erbt .template nicht.

Ergänzend nimmt die #860-Welle den echten Install-Schritt in ihren E2E-Smoke auf (bisher setzte der erst bei „Plugin ist installiert" an — genau die blinde Stelle).

Tests

8 neue Fälle in pluginPackageTemplateAllowlist.test.ts (Extractor-Scoping + Ingest über PackageUploadService). Regression: 129 Tests der Paket-/Install-/UI-Suiten grün, lint + typecheck sauber.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

A store update to @omadia/channel-teams 0.21.0 failed on the live instance
with "entry appPackage/manifest.json.template has a disallowed extension
(.template)". Producer, gatekeeper and consumer are all ours and disagreed,
so the agent factory could not install its template anywhere:

- the published 0.21.0 artifact ships appPackage/manifest.json.template
  (checked against the hub zip's central directory),
- zipExtractor's EXTENSION_ALLOWLIST is deny-by-default and had no
  .template, so ingest rejected the whole package,
- teamsAppPackageAssets reads exactly that filename and requires it by name.

.template is now accepted, scoped to appPackage/ -- the construction .woff2
already uses under ui/. Scoped rather than global because the extension says
nothing about content: the file is read as text and never loaded or executed,
which puts it in the class of the already-allowed .txt / .md, but only one
directory has a reason to carry it.

Renaming to an allowed extension was the alternative and is worse: the
consumer filename is compiled into the running release, so a renamed plugin
would blind the factory until the middleware caught up -- an ordering
constraint for no security gain, and it would invalidate the published zip.

The gap was in the process rather than the deploy: nothing ever held the
published package layout against the ingest gate (npm run package checks the
zip builds, the drift-guard checks versions). The new test pushes the actual
appPackage/ layout through the extractor and pins the scope in both
directions -- root-level and look-alike directories still reject.
@Weegy
Weegy merged commit 293af9f into main Aug 26, 2026
9 of 10 checks passed
Weegy added a commit that referenced this pull request Aug 27, 2026
Operators had no single place that says how to get several omadia agents
into Microsoft Teams as separate named bots. The knowledge was spread
across three repos, two manifests, five migrations and a handful of PR
descriptions, so every attempt rediscovered the same traps: consent that
silently does not apply, ARM fields whose absence is a partial success
rather than a failure, and a teams_bots block nothing syncs for you.

The new guide walks the whole path and states the platform limits up
front, because they decide the architecture: Teams cannot change a bot
name per message, bots never see each other, and rate limits are per bot
(which is an argument FOR separate identities, not against them).

Every API path, field name, state and setup key is verified against main
rather than carried over from the draft, which predated three waves --
the operator UI (#896), the memory ACL (#881) and the .template ingest
fix (#880) all landed after it. The one claim that could not be grounded
in code is marked as a VERIFY comment instead of asserted.

Part of #860
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