Skip to content

Answer whether a workspace still matches the settings in force - #5

Merged
btriapitsyn merged 1 commit into
mainfrom
feat/report-workspace-policy-state
Aug 6, 2026
Merged

Answer whether a workspace still matches the settings in force#5
btriapitsyn merged 1 commit into
mainfrom
feat/report-workspace-policy-state

Conversation

@btriapitsyn

Copy link
Copy Markdown
Collaborator

Problem

A workspace created under settings that have since changed announces itself only by refusing an operation the operator had already chosen to run — and the refusal surfaces as a panel-level warning, so with more than one workspace you cannot tell which it refers to.

Every fact needed to say this earlier is already recorded in the workspace's own metadata. The refusal was avoidable.

Why a new method

  • inspectWorkspace answers a related question, but runs a health check against the provider — far too expensive to run once per row of a list.
  • The fingerprint comparison folds in each workspace's own image digest, so it cannot be reproduced by comparing one value in a caller. Reproducing it outside this package would be a second implementation of the same rule, free to drift from this one.

describeWorkspacePolicyState reads the answer from the record and contacts nothing.

Tests

Two cases in the existing suite: a matching workspace, and one whose fingerprint no longer matches — the second asserting no provider call is made, since that is the whole point.

A workspace created under settings that have since changed announced itself
only by refusing an operation the operator had already chosen to run. Every
fact needed to say so earlier is recorded in the workspace's own metadata, so
the refusal was avoidable: the surface could have said which workspace was
affected before anyone asked it to do anything.

Nothing exposed that cheaply. `inspectWorkspace` answers a related question but
runs a health check against the provider, which is far too expensive to do once
per row of a list, and the fingerprint comparison folds in each workspace's own
image digest, so it cannot be reproduced by comparing a single value elsewhere
— reproducing it outside this package would be a second implementation free to
drift from this one.

`describeWorkspacePolicyState` reads the answer from the record and contacts
nothing.
@btriapitsyn
btriapitsyn merged commit 76bbe58 into main Aug 6, 2026
7 checks passed
@btriapitsyn
btriapitsyn deleted the feat/report-workspace-policy-state branch August 6, 2026 11:27
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