Add UNKNOWN and NOT_IMPLEMENTED measure states

Introduce two new measure states across the full stack: database
migration, Go coredata, GraphQL schema, MCP specification, and
frontend UI (labels, badge variants, and colors).

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-04-01 17:45:19 +02:00
parent d069201899
commit a2f0a37b7b
8 changed files with 49 additions and 1 deletions

View File

@@ -28,6 +28,8 @@ const (
MeasureStateInProgress
MeasureStateNotApplicable
MeasureStateImplemented
MeasureStateUnknown
MeasureStateNotImplemented
)
func MeasureStates() []MeasureState {
@@ -36,6 +38,8 @@ func MeasureStates() []MeasureState {
MeasureStateInProgress,
MeasureStateNotApplicable,
MeasureStateImplemented,
MeasureStateUnknown,
MeasureStateNotImplemented,
}
}
@@ -55,6 +59,10 @@ func (ms *MeasureState) UnmarshalText(data []byte) error {
*ms = MeasureStateNotApplicable
case MeasureStateImplemented.String():
*ms = MeasureStateImplemented
case MeasureStateUnknown.String():
*ms = MeasureStateUnknown
case MeasureStateNotImplemented.String():
*ms = MeasureStateNotImplemented
default:
return fmt.Errorf("invalid MeasureState value: %q", val)
}
@@ -74,6 +82,10 @@ func (ms MeasureState) String() string {
val = "NOT_APPLICABLE"
case MeasureStateImplemented:
val = "IMPLEMENTED"
case MeasureStateUnknown:
val = "UNKNOWN"
case MeasureStateNotImplemented:
val = "NOT_IMPLEMENTED"
}
return val

View File

@@ -0,0 +1,16 @@
-- Copyright (c) 2025-2026 Probo Inc <hello@getprobo.com>.
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-- PERFORMANCE OF THIS SOFTWARE.
ALTER TYPE mitigation_state ADD VALUE IF NOT EXISTS 'UNKNOWN';
ALTER TYPE mitigation_state ADD VALUE IF NOT EXISTS 'NOT_IMPLEMENTED';

View File

@@ -54,6 +54,14 @@ enum MeasureState
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MeasureStateImplemented"
)
UNKNOWN
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MeasureStateUnknown"
)
NOT_IMPLEMENTED
@goEnum(
value: "go.probo.inc/probo/pkg/coredata.MeasureStateNotImplemented"
)
}
enum TaskState @goModel(model: "go.probo.inc/probo/pkg/coredata.TaskState") {

View File

@@ -1350,6 +1350,8 @@ components:
- IN_PROGRESS
- NOT_APPLICABLE
- IMPLEMENTED
- UNKNOWN
- NOT_IMPLEMENTED
go.probo.inc/mcpgen/type: go.probo.inc/probo/pkg/coredata.MeasureState
MeasureOrderField: