feat: validate agent protocol boundaries

This commit is contained in:
2026-08-31 08:44:22 +00:00
parent d6d93f3d98
commit fb41c5ff65
8 changed files with 787 additions and 3 deletions
+44 -2
View File
@@ -52,7 +52,17 @@ tests = ["internal/domain/lifecycle_test.go:TestLaunchBarrier_HP_LAUNCH_01"]
id = "HP-PROTO-01"
layer = "unit"
status = "implemented"
tests = ["internal/domain/sequence_test.go:TestOutputTruncationRanges_HP_PROTO_01"]
tests = [
"internal/domain/sequence_test.go:TestOutputTruncationRanges_HP_PROTO_01",
"internal/agentproto/validate_test.go:TestDecodeEnvelopeBoundaries_HP_PROTO_01",
"internal/agentproto/validate_test.go:TestExecutionSpecValidation_HP_PROTO_01",
]
[[requirements]]
id = "HP-PROTO-05"
layer = "unit"
status = "implemented"
tests = ["internal/agentproto/validate_test.go:TestOutputChunkBoundedDecompression_HP_PROTO_05"]
[[requirements]]
id = "HP-PROTO-09"
@@ -75,9 +85,41 @@ layer = "unit"
status = "implemented"
tests = ["internal/domain/errors_test.go:TestWindowsPrelaunchErrorCodes_HP_WINCTX_01"]
[[requirements]]
id = "BH-SES-01"
layer = "unit"
status = "implemented"
tests = [
"internal/agentproto/validate_test.go:TestEnvelopeSessionFencingShape_BH_SES_01",
"internal/agentproto/validate_test.go:TestReconciliationRowsAndCapacity_BH_SES_01",
]
[[requirements]]
id = "BH-IDEM-01"
layer = "unit"
status = "implemented"
tests = ["internal/agentproto/validate_test.go:TestCommandDispatchUUIDRevisionAndTimestamp_BH_IDEM_01"]
[[requirements]]
id = "BH-SCRIPT-01"
layer = "unit"
status = "implemented"
tests = ["internal/agentproto/validate_test.go:TestScriptDescriptorHostileNames_BH_SCRIPT_01"]
[[requirements]]
id = "BH-LAUNCH-01"
layer = "unit"
status = "implemented"
tests = ["internal/agentproto/validate_test.go:TestWindowsEnvironmentCaseCollision_BH_LAUNCH_01"]
[[requirements]]
id = "BH-OUTFLOW-01"
layer = "unit"
status = "implemented"
tests = ["internal/agentproto/validate_test.go:TestCommandEventPayloadValidation_BH_OUTFLOW_01"]
[[requirements]]
id = "HP-WINCTX-02"
layer = "integration"
status = "blocked_native_windows"
tests = []
+1 -1
View File
@@ -445,7 +445,7 @@ type coverageRequirement struct {
Tests []string `toml:"tests"`
}
var coverageIDPattern = regexp.MustCompile(`^(HP|ERR|RACE|CRASH|SEC|BOUND|REC)-[A-Z0-9]+-[0-9]{2}$`)
var coverageIDPattern = regexp.MustCompile(`^(HP|BH|ERR|RACE|CRASH|SEC|BOUND|REC)-[A-Z0-9]+-[0-9]{2}$`)
func validateCoverageInventory(path string) error {
absolutePath, err := filepath.Abs(path)