Skip to content

the New namespace form cannot place when the team label is one that cmapi fills in, or is optional and left empty #778

Backlog

Description

@ephico2real2

Title: Portal: a team label that cmapi derives, or an optional one left empty, leaves the Placement preview waiting

Severity: Low, not security. sev:low, Backlog. No shipped metadata-keys file has such a team label: the reference
file's cmapi.net/team and the company file's company.net/mnemonic are required and typed.

What is wrong. The form places for the value of the team label's field (teamFieldOf, metadataForm.ts). It reads
that value from what the person typed, or from a default copied from another typed key (shownValues). Two metadata-keys
files leave it empty for ever, so teamOk is false, no ranking is asked for and Check and Submit never open:

  1. the team label has value: {from: namespace | cluster | environment | instance} (cmapi fills it in), named by teamKey
    or declared as cmapi.net/team;
  2. the team label is optional (extraLabels.keys) and the person leaves it empty, although the API takes a create with
    no team and a placement with no team.

Both predate PR #771 for cmapi.net/team; teamKey (#258) lets a file name any declared label, so it reaches more files.

Where. cmapi-portal-ui/src/portal/NewNamespaceTab.tsx, the lines that compute team, teamOk and ask (317 to 323
after PR #771).

How to prove it. In cmapi-portal-ui/tests/api/portal.test.mjs, serve a metadata-keys answer whose team label has
x-cmapi-derived-from: environment (or is not in required and is left empty), open New namespace and wait for the
Placement preview: it stays on "Enter the team to rank this environment's clusters for it."

What reviewer 1 proposed, and why it was not taken in PR #771. codex-fix.diff ranks with no team in those cases and
places at Submit with the team label of the dry run (planOk.metadata.labels[form.teamKey].value). Reviewer 2 scoped it
out: (a) it also changes the form for every answer (the Submit path, and an optional team left empty), which is beyond the
defect of #258; (b) a ranking made with no team and a hold taken with a team can choose different clusters (the team's
namespaces on a cluster weigh in the ranking), and the form then says "Placement now holds X ... Press Check again", which
ranks with no team again; (c) reviewer 2 had no portal node_modules, so tsc, the build and the browser suites could
not prove it. A design that ranks again with the dry run's team before the hold would close (b).

Research mandate: Research: search the primary sources, compare the options, choose the industry best practice, fix the
cause rather than the symptom, and record the choice and its sources.

Parent: Part of #258 (story #21 for placement).

Activity

  1. added
    bug
    sev:low
    Backlog
    on Dec 1, 2026
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

    Backlogbugsev:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions