borgmcp-shared 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/RELEASES.md +5 -0
- package/dist/conformance/adapter.d.ts +13 -4
- package/dist/conformance/adapter.d.ts.map +1 -1
- package/dist/conformance/adapter.js +205 -23
- package/dist/conformance/adapter.js.map +1 -1
- package/dist/conformance/index.d.ts +43 -0
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +91 -0
- package/dist/conformance/index.js.map +1 -1
- package/dist/protocol/contract.d.ts +18 -2
- package/dist/protocol/contract.d.ts.map +1 -1
- package/dist/protocol/contract.js +19 -3
- package/dist/protocol/contract.js.map +1 -1
- package/dist/protocol/coordination.d.ts +27 -0
- package/dist/protocol/coordination.d.ts.map +1 -1
- package/dist/protocol/coordination.js +71 -1
- package/dist/protocol/coordination.js.map +1 -1
- package/dist/protocol/errors.d.ts +5 -1
- package/dist/protocol/errors.d.ts.map +1 -1
- package/dist/protocol/errors.js +5 -1
- package/dist/protocol/errors.js.map +1 -1
- package/dist/protocol/version.d.ts +1 -1
- package/dist/protocol/version.js +1 -1
- package/docs/compatibility.md +9 -1
- package/docs/enrollment.md +2 -5
- package/docs/release-records.json +28 -0
- package/docs/releasing.md +5 -9
- package/package.json +1 -1
- package/src/conformance/adapter.ts +369 -32
- package/src/conformance/index.ts +139 -0
- package/src/protocol/contract.ts +20 -3
- package/src/protocol/coordination.ts +121 -0
- package/src/protocol/errors.ts +6 -3
- package/src/protocol/version.ts +2 -2
package/README.md
CHANGED
|
@@ -108,8 +108,7 @@ Cube managers reassign a seat with `PATCH /api/cubes/:cubeId/drones/:droneId`
|
|
|
108
108
|
and evict one with `DELETE` on the same path. Both operations use strict
|
|
109
109
|
versioned request and success envelopes. An evicted seat's former bearer receives
|
|
110
110
|
the terminal `410 DRONE_EVICTED` signal; revoked sessions return
|
|
111
|
-
`401 SESSION_REVOKED
|
|
112
|
-
authentication outcome, `401 AUTH_EXPIRED`.
|
|
111
|
+
`401 SESSION_REVOKED`.
|
|
113
112
|
An authenticated drone session updates only its own advisory identity with
|
|
114
113
|
`PATCH /api/cubes/:cubeId/drones/self/metadata`. The strict patch carries no
|
|
115
114
|
target seat ID. Metadata never grants authority or changes role, wake, liveness,
|
package/RELEASES.md
CHANGED
|
@@ -31,3 +31,8 @@ Never rerun or move that tag.
|
|
|
31
31
|
`672423566ed75cf7704775cb480a75767e7c6851` peels to protected-main commit
|
|
32
32
|
`f4870596ba79702f2e4eb3a6620802d5e538052d`; successful attempt-1 workflow run
|
|
33
33
|
`30625736845` published it. Never rerun or move that tag.
|
|
34
|
+
`borgmcp-shared@0.10.0` is published and immutable: annotated tag `v0.10.0`
|
|
35
|
+
peels to protected-main commit `8e5bd088b8069951a687156c35cf68d44985ddc1`;
|
|
36
|
+
successful attempt-1 workflow run `31255563527` published registry integrity
|
|
37
|
+
`sha512-NYZJi6z0g/Txb6ge+5NgRPNRszVEi0eNmICxkoZq5bGkJWm5qEvNSt3ws90Xz8IOKuWcyHC9i6sAK6cbZxwYDw==`.
|
|
38
|
+
Never rerun or move that tag.
|
|
@@ -21,7 +21,7 @@ export interface ConformanceDroneRuntimeState {
|
|
|
21
21
|
readonly metadata_revision: number;
|
|
22
22
|
readonly cube_id: string;
|
|
23
23
|
readonly role_id: string;
|
|
24
|
-
readonly session_state: 'active' | 'revoked'
|
|
24
|
+
readonly session_state: 'active' | 'revoked';
|
|
25
25
|
readonly evicted: boolean;
|
|
26
26
|
readonly last_seen: string;
|
|
27
27
|
readonly heartbeat_count: number;
|
|
@@ -125,11 +125,15 @@ export interface ConformanceAdmin {
|
|
|
125
125
|
createRole(cube: ConformanceCube, input: {
|
|
126
126
|
readonly roleClass: 'queen' | 'worker';
|
|
127
127
|
readonly isHumanSeat: boolean;
|
|
128
|
+
readonly name?: string;
|
|
129
|
+
readonly detailedDescription?: string;
|
|
130
|
+
readonly isDefault?: boolean;
|
|
131
|
+
readonly isMandatory?: boolean;
|
|
128
132
|
}): Promise<ConformanceRole>;
|
|
133
|
+
referenceRoleFromTaxonomy(cube: ConformanceCube, role: ConformanceRole): Promise<void>;
|
|
129
134
|
createDrone(principal: ConformancePrincipal, cube: ConformanceCube, role: ConformanceRole): Promise<ConformanceDrone>;
|
|
130
135
|
issueManagedDroneSession(drone: ConformanceDrone): Promise<string>;
|
|
131
136
|
revokeManagedDroneSession(drone: ConformanceDrone): Promise<void>;
|
|
132
|
-
expireManagedDroneSession(drone: ConformanceDrone): Promise<void>;
|
|
133
137
|
inspectManagedDrone(drone: ConformanceDrone): Promise<{
|
|
134
138
|
readonly role_id: string;
|
|
135
139
|
readonly evicted: boolean;
|
|
@@ -174,6 +178,8 @@ export interface ConformanceOperations {
|
|
|
174
178
|
listDrones(credential: string, cube: ConformanceCube): Promise<ConformanceHttpResponse>;
|
|
175
179
|
reassignDrone(credential: string, cube: ConformanceCube, drone: ConformanceDrone, request: unknown): Promise<ConformanceHttpResponse>;
|
|
176
180
|
evictDrone(credential: string, cube: ConformanceCube, drone: ConformanceDrone, request: unknown): Promise<ConformanceHttpResponse>;
|
|
181
|
+
deleteRole(credential: string, cube: ConformanceCube, role: ConformanceRole, request: unknown): Promise<ConformanceHttpResponse>;
|
|
182
|
+
roleRationale(credential: string, cube: ConformanceCube, request: unknown): Promise<ConformanceHttpResponse>;
|
|
177
183
|
openStream(credential: string, cube: ConformanceCube, cursor: LogCursor | null): Promise<ConformanceStreamResponse>;
|
|
178
184
|
}
|
|
179
185
|
export interface ConformanceEnvironment {
|
|
@@ -238,8 +244,11 @@ export declare const ADAPTER_CONFORMANCE_FIXTURES: readonly [{
|
|
|
238
244
|
readonly id: "drones.evict-terminal-signal";
|
|
239
245
|
readonly area: "drones";
|
|
240
246
|
}, {
|
|
241
|
-
readonly id: "
|
|
242
|
-
readonly area: "
|
|
247
|
+
readonly id: "roles.delete-contract";
|
|
248
|
+
readonly area: "roles";
|
|
249
|
+
}, {
|
|
250
|
+
readonly id: "roles.rationale-contract";
|
|
251
|
+
readonly area: "roles";
|
|
243
252
|
}, {
|
|
244
253
|
readonly id: "metadata.attach-report";
|
|
245
254
|
readonly area: "metadata";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/conformance/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/conformance/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EA8BL,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,YAAY,EAEjB,KAAK,SAAS,EAEd,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAQ9B,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAC;IACxC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,S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 +1,4 @@
|
|
|
1
|
-
import { ErrorCode, compareLogCursor, createProtocolEnvelope, decodeAssociateRepositoryCubeResponseEnvelope, decodeCreateCubeResponseEnvelope, decodeDeleteCubeResponseEnvelope, decodeAppendLogResultEnvelope, decodeDecisionResultEnvelope, decodeDecisionsResultEnvelope, decodeEnrollmentExchangeResponseEnvelope, decodeInvitationArtifact, decodeAttachResponseEnvelope, decodeDroneRuntimeMetadataPatch, decodeEvictDroneResultEnvelope, decodeProtocolEnvelope, decodeProtocolErrorEnvelope, decodeProtocolTagPreflight, decodeReadLogResultEnvelope, decodeResolveRepositoryCubeResponseEnvelope, decodeReassignDroneResultEnvelope, decodeUpdateDroneRuntimeMetadataResponseEnvelope, decodeSseFrames, PROTOCOL_LIMIT_CEILINGS, PROTOCOL_HTTP_CONTRACT, PROTOCOL_VERSION, utf8ByteLength, } from '../protocol/index.js';
|
|
1
|
+
import { ErrorCode, compareLogCursor, createProtocolEnvelope, decodeAssociateRepositoryCubeResponseEnvelope, decodeCreateCubeResponseEnvelope, decodeDeleteCubeResponseEnvelope, decodeAppendLogResultEnvelope, decodeDecisionResultEnvelope, decodeDecisionsResultEnvelope, decodeEnrollmentExchangeResponseEnvelope, decodeInvitationArtifact, decodeAttachResponseEnvelope, decodeDroneRuntimeMetadataPatch, decodeEvictDroneResultEnvelope, decodeDeleteRoleResultEnvelope, decodeRoleRationaleResultEnvelope, decodeProtocolEnvelope, decodeProtocolErrorEnvelope, decodeProtocolTagPreflight, decodeReadLogResultEnvelope, decodeResolveRepositoryCubeResponseEnvelope, decodeReassignDroneResultEnvelope, decodeUpdateDroneRuntimeMetadataResponseEnvelope, decodeSseFrames, PROTOCOL_LIMIT_CEILINGS, PROTOCOL_HTTP_CONTRACT, PROTOCOL_VERSION, ROLE_IN_USE_DELETE_MESSAGE, utf8ByteLength, } from '../protocol/index.js';
|
|
2
2
|
import { CREATE_CUBE_ASSOCIATION_CONFORMANCE, CREATE_CUBE_RETRY_CONFORMANCE, INVITATION_ARTIFACT_CONFORMANCE, ENROLLMENT_RETRY_CONFORMANCE, } from './index.js';
|
|
3
3
|
export const ADAPTER_CONFORMANCE_FIXTURES = [
|
|
4
4
|
{ id: 'http.unauthenticated-liveness', area: 'http' },
|
|
@@ -20,7 +20,8 @@ export const ADAPTER_CONFORMANCE_FIXTURES = [
|
|
|
20
20
|
{ id: 'drones.reassign-invariants', area: 'drones' },
|
|
21
21
|
{ id: 'security.cross-cube-drone-management', area: 'security' },
|
|
22
22
|
{ id: 'drones.evict-terminal-signal', area: 'drones' },
|
|
23
|
-
{ id: '
|
|
23
|
+
{ id: 'roles.delete-contract', area: 'roles' },
|
|
24
|
+
{ id: 'roles.rationale-contract', area: 'roles' },
|
|
24
25
|
{ id: 'metadata.attach-report', area: 'metadata' },
|
|
25
26
|
{ id: 'metadata.self-heal-patch', area: 'metadata' },
|
|
26
27
|
{ id: 'security.metadata-invalid-atomic', area: 'security' },
|
|
@@ -45,6 +46,14 @@ function protocolError(response) {
|
|
|
45
46
|
return null;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
49
|
+
function protocolErrorMessage(response) {
|
|
50
|
+
try {
|
|
51
|
+
return decodeProtocolErrorEnvelope(response.body).error.message;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
48
57
|
function delay(milliseconds) {
|
|
49
58
|
const setTimeoutValue = globalThis.setTimeout;
|
|
50
59
|
if (!setTimeoutValue)
|
|
@@ -973,24 +982,201 @@ export async function runAdapterConformance(environment, options = {}) {
|
|
|
973
982
|
old_bearer_code: ErrorCode.DRONE_EVICTED,
|
|
974
983
|
};
|
|
975
984
|
});
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
await environment.admin.
|
|
982
|
-
await environment.admin.
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
985
|
+
let roleContractCube;
|
|
986
|
+
let roleContractPrincipal;
|
|
987
|
+
let roleContractCredential = '';
|
|
988
|
+
let roleContractReadCredential = '';
|
|
989
|
+
await record('roles.delete-contract', async () => {
|
|
990
|
+
roleContractPrincipal = await environment.admin.createPrincipal('role-contract-manager');
|
|
991
|
+
const roleContractReader = await environment.admin.createPrincipal('role-contract-reader');
|
|
992
|
+
roleContractCube = await environment.admin.createCube('role-contract-cube');
|
|
993
|
+
await environment.admin.grantCube(roleContractPrincipal, roleContractCube, 'manage');
|
|
994
|
+
await environment.admin.grantCube(roleContractReader, roleContractCube, 'read');
|
|
995
|
+
const managerInvitation = await environment.admin.issueSingleUseInvitation(roleContractPrincipal, 'client');
|
|
996
|
+
const readerInvitation = await environment.admin.issueSingleUseInvitation(roleContractReader, 'client');
|
|
997
|
+
roleContractCredential = `${'D'.repeat(42)}Q`;
|
|
998
|
+
roleContractReadCredential = `${'L'.repeat(42)}Q`;
|
|
999
|
+
expectStatus(await environment.operations.enroll(createProtocolEnvelope('role-contract-manager-enroll', {
|
|
1000
|
+
invitation: managerInvitation,
|
|
1001
|
+
retry_key: '00000000-0000-4000-8000-000000000351',
|
|
1002
|
+
client_credential: roleContractCredential,
|
|
1003
|
+
})), 201, 'Role-contract manager enrollment');
|
|
1004
|
+
expectStatus(await environment.operations.enroll(createProtocolEnvelope('role-contract-reader-enroll', {
|
|
1005
|
+
invitation: readerInvitation,
|
|
1006
|
+
retry_key: '00000000-0000-4000-8000-000000000352',
|
|
1007
|
+
client_credential: roleContractReadCredential,
|
|
1008
|
+
})), 201, 'Role-contract reader enrollment');
|
|
1009
|
+
const defaultRole = await environment.admin.createRole(roleContractCube, {
|
|
1010
|
+
roleClass: 'worker',
|
|
1011
|
+
isHumanSeat: false,
|
|
1012
|
+
name: 'Default Worker',
|
|
1013
|
+
isDefault: true,
|
|
1014
|
+
});
|
|
1015
|
+
const mandatoryRole = await environment.admin.createRole(roleContractCube, {
|
|
1016
|
+
roleClass: 'worker',
|
|
1017
|
+
isHumanSeat: false,
|
|
1018
|
+
name: 'Mandatory Worker',
|
|
1019
|
+
isMandatory: true,
|
|
1020
|
+
});
|
|
1021
|
+
const humanRole = await environment.admin.createRole(roleContractCube, {
|
|
1022
|
+
roleClass: 'queen',
|
|
1023
|
+
isHumanSeat: true,
|
|
1024
|
+
name: 'Human Seat',
|
|
1025
|
+
});
|
|
1026
|
+
const referencedRole = await environment.admin.createRole(roleContractCube, {
|
|
1027
|
+
roleClass: 'worker',
|
|
1028
|
+
isHumanSeat: false,
|
|
1029
|
+
name: 'Routed Reviewer',
|
|
1030
|
+
});
|
|
1031
|
+
await environment.admin.referenceRoleFromTaxonomy(roleContractCube, referencedRole);
|
|
1032
|
+
const activeRole = await environment.admin.createRole(roleContractCube, {
|
|
1033
|
+
roleClass: 'worker',
|
|
1034
|
+
isHumanSeat: false,
|
|
1035
|
+
name: 'Active Worker',
|
|
1036
|
+
});
|
|
1037
|
+
await environment.admin.createDrone(roleContractPrincipal, roleContractCube, activeRole);
|
|
1038
|
+
const refusals = [
|
|
1039
|
+
[defaultRole, ErrorCode.DEFAULT_ROLE_REQUIRED, 'default role'],
|
|
1040
|
+
[mandatoryRole, ErrorCode.ROLE_REQUIRED, 'mandatory role'],
|
|
1041
|
+
[humanRole, ErrorCode.ROLE_REQUIRED, 'human-seat role'],
|
|
1042
|
+
[referencedRole, ErrorCode.ROLE_REFERENCED, 'taxonomy-referenced role'],
|
|
1043
|
+
[activeRole, ErrorCode.ROLE_IN_USE, 'active-drone role'],
|
|
1044
|
+
];
|
|
1045
|
+
for (const [index, [role, code, label]] of refusals.entries()) {
|
|
1046
|
+
const before = await environment.admin.inspectCubeManagementState(roleContractCube);
|
|
1047
|
+
const response = await environment.operations.deleteRole(roleContractCredential, roleContractCube, role, createProtocolEnvelope(`delete-refusal-${index}`, {}));
|
|
1048
|
+
expectError(response, 409, code, `Delete ${label}`);
|
|
1049
|
+
invariant(same(await environment.admin.inspectCubeManagementState(roleContractCube), before), `Delete ${label} mutated cube state after refusal.`);
|
|
1050
|
+
if (code === ErrorCode.ROLE_IN_USE) {
|
|
1051
|
+
const message = protocolErrorMessage(response) ?? '';
|
|
1052
|
+
invariant(message === ROLE_IN_USE_DELETE_MESSAGE, 'ROLE_IN_USE did not direct the caller to reassign or evict the drones first.');
|
|
1053
|
+
}
|
|
988
1054
|
}
|
|
1055
|
+
const unknownRole = { id: '00000000-0000-4000-8000-000000000398' };
|
|
1056
|
+
expectError(await environment.operations.deleteRole(roleContractCredential, roleContractCube, unknownRole, createProtocolEnvelope('delete-unknown-role', {})), 404, ErrorCode.NOT_FOUND, 'Delete unknown role');
|
|
1057
|
+
const deletableRole = await environment.admin.createRole(roleContractCube, {
|
|
1058
|
+
roleClass: 'worker',
|
|
1059
|
+
isHumanSeat: false,
|
|
1060
|
+
name: 'Disposable Worker',
|
|
1061
|
+
});
|
|
1062
|
+
const beforeReadDenial = await environment.admin.inspectCubeManagementState(roleContractCube);
|
|
1063
|
+
expectError(await environment.operations.deleteRole(roleContractReadCredential, roleContractCube, deletableRole, createProtocolEnvelope('delete-role-read-denied', {})), 403, ErrorCode.ACCESS_DENIED, 'Delete role with read authority');
|
|
1064
|
+
invariant(same(await environment.admin.inspectCubeManagementState(roleContractCube), beforeReadDenial), 'Read-authority role deletion mutated cube state.');
|
|
1065
|
+
const deleted = await environment.operations.deleteRole(roleContractCredential, roleContractCube, deletableRole, createProtocolEnvelope('delete-empty-role', {}));
|
|
1066
|
+
expectStatus(deleted, 200, 'Delete unassigned role');
|
|
1067
|
+
invariant(same(decodeDeleteRoleResultEnvelope(deleted.body).payload, {
|
|
1068
|
+
role_id: deletableRole.id,
|
|
1069
|
+
deleted: true,
|
|
1070
|
+
}), 'Role deletion response did not identify the deleted role.');
|
|
1071
|
+
const evictedRole = await environment.admin.createRole(roleContractCube, {
|
|
1072
|
+
roleClass: 'worker',
|
|
1073
|
+
isHumanSeat: false,
|
|
1074
|
+
name: 'Former Worker',
|
|
1075
|
+
});
|
|
1076
|
+
const evictedDrone = await environment.admin.createDrone(roleContractPrincipal, roleContractCube, evictedRole);
|
|
1077
|
+
const evictedSession = await environment.admin.issueManagedDroneSession(evictedDrone);
|
|
1078
|
+
const attributed = await environment.operations.append(evictedSession, roleContractCube, createProtocolEnvelope('role-delete-attribution', { message: 'attribution survives' }));
|
|
1079
|
+
expectStatus(attributed, 201, 'Pre-delete attributed log');
|
|
1080
|
+
const attributedEntry = decodeAppendLogResultEnvelope(attributed.body).payload.entry;
|
|
1081
|
+
expectStatus(await environment.operations.evictDrone(roleContractCredential, roleContractCube, evictedDrone, createProtocolEnvelope('role-delete-evict', {})), 200, 'Pre-delete drone eviction');
|
|
1082
|
+
expectStatus(await environment.operations.deleteRole(roleContractCredential, roleContractCube, evictedRole, createProtocolEnvelope('delete-evicted-role', {})), 200, 'Delete role held only by an evicted drone');
|
|
1083
|
+
invariant((await environment.admin.inspectManagedDrone(evictedDrone)).role_id === defaultRole.id, 'Role deletion did not retarget the evicted drone to the surviving default role.');
|
|
1084
|
+
const read = await environment.operations.read(roleContractCredential, roleContractCube, createProtocolEnvelope('read-role-delete-attribution', { cursor: null, limit: 500 }));
|
|
1085
|
+
expectStatus(read, 200, 'Post-delete attributed log read');
|
|
1086
|
+
invariant(decodeReadLogResultEnvelope(read.body).payload.entries.some((entry) => entry.id === attributedEntry.id && entry.drone_id === evictedDrone.id), 'Deleting the evicted drone role lost the drone attribution of an existing log entry.');
|
|
1087
|
+
return {
|
|
1088
|
+
success_status: 200,
|
|
1089
|
+
hidden_status: 404,
|
|
1090
|
+
refusal_codes: [
|
|
1091
|
+
ErrorCode.ROLE_IN_USE,
|
|
1092
|
+
ErrorCode.DEFAULT_ROLE_REQUIRED,
|
|
1093
|
+
ErrorCode.ROLE_REQUIRED,
|
|
1094
|
+
ErrorCode.ROLE_REFERENCED,
|
|
1095
|
+
],
|
|
1096
|
+
in_use_message_actionable: true,
|
|
1097
|
+
evicted_drone_retargeted: true,
|
|
1098
|
+
activity_log_attribution_preserved: true,
|
|
1099
|
+
};
|
|
1100
|
+
});
|
|
1101
|
+
await record('roles.rationale-contract', async () => {
|
|
1102
|
+
const detailedDescription = [
|
|
1103
|
+
'Implements assigned work.',
|
|
1104
|
+
'',
|
|
1105
|
+
'Workflow rationale:',
|
|
1106
|
+
'This exact stored section body is returned.',
|
|
1107
|
+
'',
|
|
1108
|
+
'Boundaries:',
|
|
1109
|
+
'Do not expand scope.',
|
|
1110
|
+
].join('\n');
|
|
1111
|
+
const role = await environment.admin.createRole(roleContractCube, {
|
|
1112
|
+
roleClass: 'worker',
|
|
1113
|
+
isHumanSeat: false,
|
|
1114
|
+
name: 'Rationale Builder',
|
|
1115
|
+
detailedDescription,
|
|
1116
|
+
});
|
|
1117
|
+
const expectedSection = {
|
|
1118
|
+
heading: 'Workflow rationale',
|
|
1119
|
+
body: 'Workflow rationale:\nThis exact stored section body is returned.\n\n',
|
|
1120
|
+
};
|
|
1121
|
+
for (const [index, [selector, section]] of [
|
|
1122
|
+
[role.id, 'Workflow rationale'],
|
|
1123
|
+
['rAtIoNaLe BuIlDeR', 'wOrKfLoW rAtIoNaLe'],
|
|
1124
|
+
].entries()) {
|
|
1125
|
+
const response = await environment.operations.roleRationale(roleContractReadCredential, roleContractCube, createProtocolEnvelope(`rationale-lookup-${index}`, { role: selector, section }));
|
|
1126
|
+
expectStatus(response, 200, 'Role rationale lookup');
|
|
1127
|
+
const result = decodeRoleRationaleResultEnvelope(response.body).payload;
|
|
1128
|
+
invariant(result.role_id === role.id &&
|
|
1129
|
+
result.role_name === 'Rationale Builder' &&
|
|
1130
|
+
same(result.section, expectedSection), 'Role rationale lookup did not return the canonical heading and exact stored section body.');
|
|
1131
|
+
}
|
|
1132
|
+
expectError(await environment.operations.roleRationale(roleContractReadCredential, roleContractCube, createProtocolEnvelope('rationale-unknown-role', {
|
|
1133
|
+
role: 'Unknown Role',
|
|
1134
|
+
section: 'Workflow rationale',
|
|
1135
|
+
})), 404, ErrorCode.ROLE_NOT_FOUND, 'Unknown role rationale lookup');
|
|
1136
|
+
const inaccessibleRole = await environment.admin.createRole(cubeB, {
|
|
1137
|
+
roleClass: 'worker',
|
|
1138
|
+
isHumanSeat: false,
|
|
1139
|
+
name: 'Foreign Rationale Role',
|
|
1140
|
+
detailedDescription,
|
|
1141
|
+
});
|
|
1142
|
+
expectError(await environment.operations.roleRationale(roleContractReadCredential, roleContractCube, createProtocolEnvelope('rationale-inaccessible-role', {
|
|
1143
|
+
role: inaccessibleRole.id,
|
|
1144
|
+
section: 'Workflow rationale',
|
|
1145
|
+
})), 404, ErrorCode.ROLE_NOT_FOUND, 'Inaccessible role rationale lookup');
|
|
1146
|
+
expectError(await environment.operations.roleRationale(roleContractReadCredential, roleContractCube, createProtocolEnvelope('rationale-unknown-section', {
|
|
1147
|
+
role: role.id,
|
|
1148
|
+
section: 'Missing rationale',
|
|
1149
|
+
})), 404, ErrorCode.ROLE_SECTION_NOT_FOUND, 'Unknown role section lookup');
|
|
1150
|
+
await environment.admin.createRole(roleContractCube, {
|
|
1151
|
+
roleClass: 'worker',
|
|
1152
|
+
isHumanSeat: false,
|
|
1153
|
+
name: 'Ambiguous Role',
|
|
1154
|
+
detailedDescription,
|
|
1155
|
+
});
|
|
1156
|
+
await environment.admin.createRole(roleContractCube, {
|
|
1157
|
+
roleClass: 'worker',
|
|
1158
|
+
isHumanSeat: false,
|
|
1159
|
+
name: 'AMBIGUOUS ROLE',
|
|
1160
|
+
detailedDescription,
|
|
1161
|
+
});
|
|
1162
|
+
expectError(await environment.operations.roleRationale(roleContractReadCredential, roleContractCube, createProtocolEnvelope('rationale-ambiguous-role', {
|
|
1163
|
+
role: 'ambiguous role',
|
|
1164
|
+
section: 'Workflow rationale',
|
|
1165
|
+
})), 400, ErrorCode.INVALID_INPUT, 'Ambiguous role rationale lookup');
|
|
1166
|
+
expectError(await environment.operations.roleRationale(roleContractReadCredential, roleContractCube, createProtocolEnvelope('rationale-invalid-selector', {
|
|
1167
|
+
role: ' Rationale Builder',
|
|
1168
|
+
section: 'Workflow rationale',
|
|
1169
|
+
})), 400, ErrorCode.INVALID_INPUT, 'Invalid role rationale selector');
|
|
989
1170
|
return {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1171
|
+
uuid_lookup: true,
|
|
1172
|
+
case_insensitive_name_lookup: true,
|
|
1173
|
+
canonical_heading: true,
|
|
1174
|
+
exact_body: true,
|
|
1175
|
+
unknown_role_code: ErrorCode.ROLE_NOT_FOUND,
|
|
1176
|
+
inaccessible_role_code: ErrorCode.ROLE_NOT_FOUND,
|
|
1177
|
+
unknown_section_code: ErrorCode.ROLE_SECTION_NOT_FOUND,
|
|
1178
|
+
ambiguous_role_code: ErrorCode.INVALID_INPUT,
|
|
1179
|
+
invalid_selector_code: ErrorCode.INVALID_INPUT,
|
|
994
1180
|
};
|
|
995
1181
|
});
|
|
996
1182
|
const knownMetadata = {
|
|
@@ -1135,10 +1321,6 @@ export async function runAdapterConformance(environment, options = {}) {
|
|
|
1135
1321
|
const revokedSession = await environment.admin.issueManagedDroneSession(revoked);
|
|
1136
1322
|
await environment.admin.revokeManagedDroneSession(revoked);
|
|
1137
1323
|
rejectedStates.push(['revoked', revoked, revokedSession, 401, ErrorCode.SESSION_REVOKED]);
|
|
1138
|
-
const expired = await environment.admin.createDrone(principalA, cubeA, workerRoleA);
|
|
1139
|
-
const expiredSession = await environment.admin.issueManagedDroneSession(expired);
|
|
1140
|
-
await environment.admin.expireManagedDroneSession(expired);
|
|
1141
|
-
rejectedStates.push(['expired', expired, expiredSession, 401, ErrorCode.AUTH_EXPIRED]);
|
|
1142
1324
|
const evicted = await environment.admin.createDrone(principalA, cubeA, workerRoleA);
|
|
1143
1325
|
const evictedSession = await environment.admin.issueManagedDroneSession(evicted);
|
|
1144
1326
|
expectStatus(await environment.operations.evictDrone(credentialA, cubeA, evicted, createProtocolEnvelope('metadata-evict-seat', {})), 200, 'Metadata seat eviction');
|
|
@@ -1152,7 +1334,7 @@ export async function runAdapterConformance(environment, options = {}) {
|
|
|
1152
1334
|
own_seat_only: true,
|
|
1153
1335
|
manager_denied: true,
|
|
1154
1336
|
unknown_session_denied: true,
|
|
1155
|
-
|
|
1337
|
+
revoked_evicted_denied: true,
|
|
1156
1338
|
};
|
|
1157
1339
|
});
|
|
1158
1340
|
await record('security.metadata-cross-cube-isolation', async () => {
|