Skip to content

feat: add execTerminal capability validation - #649

Merged
savme merged 2 commits into
mainfrom
feat/exec-terminal-enforce
Nov 12, 2026
Merged

savme merged 2 commits into
mainfrom
feat/exec-terminal-enforce

Conversation

@savme

@savme savme commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Refuses shell sessions that ask for a terminal on classes that don't declare execTerminal, and hides the portal's shell button there. Unikernel exec runs with no PTY, so -it and the portal shell would open a shell with no prompt, echo or signals. Sessions without a terminal keep working.

  • Admission: spec.terminal: true requires the class to declare execTerminal
  • Portal: canShowShell checks execTerminal instead of exec, since the portal only opens terminal sessions
  • datumctl: a terminal refusal keeps admission's reason and adds "Run the command without -t"

Merge only after #648 is released and general-purpose declares execTerminal in every environment. Otherwise kata loses interactive shells.

Part of datum-cloud/unikraft-provider#247

Base automatically changed from feat/exec-terminal-feature to main November 12, 2026 16:23
@savme
savme marked this pull request as ready for review November 12, 2026 19:00
@savme
savme requested a review from a team as a code owner November 12, 2026 19:00

@ecv ecv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve.

The merge gate in the body is met. infra#9267 declares execTerminal on general-purpose, landed in staging on merge and is in infra tag v0.84.352 for production. Kata keeps interactive shells, and unikernel refuses -t instead of opening a shell with no prompt. Production also moves only on a compute pin bump, which gates it a second time. All checks pass at 8bd35ca.

  • Admission refuses only spec.terminal: true on a class without execTerminal, and exec without a terminal stays admitted. Tests cover all three cases.
  • datumctl matches only a Forbidden cause on spec.terminal before adding "Run the command without -t". Other terminal errors and other refused fields pass through unchanged, and tests cover both.
  • canShowShell now needs execTerminal, which matches the portal opening only terminal sessions.

Follow-ups:

  • Before the production pin bump, confirm existing production project planes carry the updated general-purpose class, not only new ones. Otherwise kata shells there are refused.

@savme
savme merged commit 71f329f into main Nov 12, 2026
14 checks passed
@savme
savme deleted the feat/exec-terminal-enforce branch November 12, 2026 20:10
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.

2 participants