Skip to content

[bug] Team Server working copy has no toolkit: changes made there skip the exec gate, snapshots and build log #765

Closed

Description

@MendixMau

Field report (Greenfield build, 2026-11-13; relayed by the maintainer, anonymised).

What happened: the app was built locally with the toolkit. To deploy it to Mendix Cloud, the user then created a separate Team Server working copy, and that copy has no .mxtk. Every later change there goes through mxcli directly, with no exec gate, no snapshots and no BUILD-LOG. The project silently leaves the toolkit at the moment it goes live.

Asked for: either a light "attach the toolkit to an existing working copy" path, or guidance (ideally automation) for moving a toolkit project onto Team Server: creating the Team Server app and remote, then pushing the existing model so the toolkit project is the Team Server copy.

Related: skills/teamserver-alignment.md, the bundled mxcli teamserver-git skill, #741 (the ContentsHash step), and bin/init-project.sh (already idempotent on an existing project?).


Filed by the triage desk from a field report. Generated by Claude Code

Activity

  1. MendixMau commented on Nov 16, 2026

    @MendixMau
    OwnerAuthor

    Triage: DISCUSS track. docs-skill + instrument gap, verified by inspection (no Team Server or PAT available here)
    Root cause / Problem: mostly yes, this is already part of the toolkit, but nothing sends a session to it.

    • skills/platform-link.md covers creating the app (PAT scopes :25-35, createNewApp :257-265), the day-one rule "Team Server is the origin, model at the root, artefacts beside it" (:297-307), and adopting an existing single-tree repo without force (:383-398).
    • But it is routed on demand (bin/lib/skill-routing.tsv:319). Only teamserver-alignment.md is baseline (:320), and that file assumes the app already exists (:9-11).
    • Nothing in bin/doctor.sh or bin/status.sh reads git remote. So a project with no platform home, or a second copy that has moved ahead of it, is invisible.
    • mxcli v0.32.0 still has no app-create or deploy command, only git note/commit/doctor/merge and marketplace auth. Our upstream ask is mxcli new: optionally create the app on the Mendix platform (Team Server repo included) mendixlabs/mxcli#1037.
      Value: H. Every project that goes live hits this. The toolkit drops out silently at the most important moment.
      Risk of fixing: L for options 1–2: advisory only, with no verdict flips or exit codes. M for option 3: it needs a PAT and Node, and Free Apps can't be deployed by API (platform-link.md:427-443).
      Process cost (Process-cost guard: a PR that adds a check, gate, obligation or test step must state its time cost per build row, under a budget #687): option 1 none. Option 2 runs per session: two local git calls, no network, ~0 s. Option 3 runs once per project. Nothing per row. Can turn red: n (WARN only).
      Needs clarification: yes. Did the user's Team Server copy start from a Portal blank app with the model copied in (an unrelated history), or from a clone of the toolkit repo?
      Learning value: learned rule in skills/platform-link.md: never a second working copy; the toolkit project is the Team Server copy.
      Proposed fix / Options:
    1. Docs: the toolkit project becomes the Team Server copy. Add a "going live" pointer to platform-link §3 from Stage 6/7 and from deploy-to-sandbox.md. Add a recovery recipe for a copy that has already split off:

      • fetch the Team Server copy into the toolkit project and take its model whole;
      • run mxcli fix hashes, then pass the gate;
      • adopt with -X ours and push without force;
      • sync the metadata notes and retire the extra copy.

      Watch for the mprname/App.mpr trap and for ContentsHash after a checkout. All modes; the PAT is needed only to push.

    2. Flag it: add a doctor/status note.

      • At Stage ≥6 with no git.api.mendix.com remote, point to platform-link.
      • When the last-fetched Team Server ref is not an ancestor of HEAD, WARN "Team Server has commits made outside the toolkit".

      A checkout without the toolkit cannot flag itself, so the watch has to run from the toolkit side.

    3. Automate: a bin/platform-create-app.sh using the Platform SDK (mx:app:create + mx:modelrepository:repo:write). A new component that needs the user's PAT and is not field-proven. Better to wait for mxcli#1037.

    init-project.sh does work on a Team Server checkout (idempotent; it only creates what is missing). But it starts a new Stage P register, so it is only right when no toolkit project exists yet, via the existing-app-change entry mode.
    Proof: option 2 needs a new fixture case on a temp repo with a fake teamserver remote ref ahead of HEAD. It must fail on master.
    Effort: option 1 S, option 2 S, option 3 M. Recommendation: DISCUSS: options 1 + 2 now; park 3. Decision needed: should Stage 7 (deploy) require a recorded Team Server remote in PROJECT.md, or only warn?
    Labels: kind/idea, enhancement, documentation, size/s, question (kind/process proposed, not synced)

    Reply go (FIX) or go option N (DISCUSS). Fix PRs still get independent review and your merge.


    Generated by Claude Code

  2. added
    documentationImprovements or additions to documentation
    enhancementNew feature or request
    questionFurther information is requested
    and removed on Nov 16, 2026
  3. MendixMau commented on Nov 16, 2026

    @MendixMau
    OwnerAuthor

    Fix PR opened: #776 (options 1 and 2, warn only). It adds a "going live: the toolkit project is the Team Server copy" rule to platform-link.md, plus a recovery recipe for a copy that has already split off. status.sh gets two WATCH warnings: no Team Server remote at Stage 6/7, and Team Server commits made outside the toolkit. Waiting for an independent review. #777 also edits status.sh, so a composition check is needed.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestkind/ideaquestionFurther information is requestedsize/s

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions