docs: freeze exact applied hire candidate and all focused22 consumed inputs

This commit is contained in:
jason.woltje committed 2026-10-25 15:10:08 -05:00
1 parent 36cef3b62c
commit fe2cb62361
6 files changed
+10616

No files matched your search

@@ -0,0 +1,87 @@
{
"baseHEAD": "36cef3b62cb20c44224164162a3f1d888d731cae",
"appliedPatch": {
"path": "agents/magica/work/queue-331/task655-r2-contract-proposed.diff",
"sha256": "ef299c54b44ba87fae00bdeb8dcbd573bf83605a36f91fcc9ef308f5a2d13cdd",
"bytes": 6978,
"gitBlob": "fe6ddf3c3b6e7980c32ac132537a057246f6c7a9"
},
"exactActualDiff": "diff --git a/packages/bus/src/model-keys.mjs b/packages/bus/src/model-keys.mjs\nindex 0bb21e09f..f6e3ff810 100644\n--- a/packages/bus/src/model-keys.mjs\n+++ b/packages/bus/src/model-keys.mjs\n@@ -116,6 +116,24 @@ export class ModelKeys {\n }\n ensure(instance) { return this.#exclusive(() => this.#issue(instance)); }\n rotate(instance) { return this.#exclusive(() => this.#issue(instance, true)); }\n+ // Host-only callbacks are the existing synchronous organization path.\n+ hire(instance, check, publish) {\n+ return this.#exclusive(async () => {\n+ check(); // Fresh validation and captured revision AFTER controller queue.\n+ const existed = this.hasRecord(instance);\n+ try {\n+ await this.#issue(instance);\n+ check(); // Recheck captured revision AFTER HTTP, before publication.\n+ return publish();\n+ } catch (error) {\n+ // A newly issued generation has not escaped to queued admission yet.\n+ if (!existed && this.hasRecord(instance)) {\n+ try { await this.#prepareRevoke(instance); this.completeRevoke(instance); } catch {}\n+ }\n+ throw error;\n+ }\n+ });\n+ }\n async preflight(instance) {\n // The revoking check must run before even an issue/preflight request.\n this.#launchable(instance);\n@@ -132,18 +150,17 @@ export class ModelKeys {\n if (status < 200 || status >= 300) fail('proxy-key-refused');\n return proxy;\n }\n- prepareRevoke(instance) {\n- return this.#exclusive(async () => {\n- const record = this.#record(instance);\n- if (!record) return;\n- if (record.state !== 'revoking') this.#credentials.writeModel(instance, { ...record, state: 'revoking', revokingAt: new Date(this.#now()).toISOString() });\n- try {\n- await this.#removeKeys([record.key, ...record.retiring.map(r => r.key)]);\n- this.#confirmed.set(instance, record.keyId);\n- this.#receipt({ action: 'proxy.key.revoked', keyIds: [record.keyId, ...record.retiring.map(r => r.keyId)], remoteState: 'revoked', localState: 'kept' });\n- } catch { fail('credential-revoke-failed'); }\n- });\n+ async #prepareRevoke(instance) {\n+ const record = this.#record(instance);\n+ if (!record) return;\n+ if (record.state !== 'revoking') this.#credentials.writeModel(instance, { ...record, state: 'revoking', revokingAt: new Date(this.#now()).toISOString() });\n+ try {\n+ await this.#removeKeys([record.key, ...record.retiring.map(r => r.key)]);\n+ this.#confirmed.set(instance, record.keyId);\n+ this.#receipt({ action: 'proxy.key.revoked', keyIds: [record.keyId, ...record.retiring.map(r => r.keyId)], remoteState: 'revoked', localState: 'kept' });\n+ } catch { fail('credential-revoke-failed'); }\n }\n+ prepareRevoke(instance) { return this.#exclusive(() => this.#prepareRevoke(instance)); }\n completeRevoke(instance) {\n const record = this.#record(instance);\n if (!record) return;\n@@ -248,20 +265,22 @@ export function modelOrganization({ modelKeys, writer }) {\n if (verb === 'instances.set') invoke(business, 'instances.check', { instance: agent }, actor, context);\n const { revision } = writer.read(business);\n if (args.revision !== undefined && args.revision !== revision) fail('revision-conflict');\n+ const checkHire = () => {\n+ if (writer.read(business).revision !== revision) fail('revision-conflict');\n+ const checked = invoke(business, 'instance.hireCheck', args, actor, context);\n+ if (checked.revision !== revision) fail('revision-conflict');\n+ return checked;\n+ };\n+ if (!isRevoke) checkHire(); // No registration or proxy I/O before shared checks.\n const prepare = { instance, revision, remoteRevoked: false };\n pending.set(business, prepare);\n const existed = modelKeys.hasRecord(instance);\n try {\n if (isRevoke) { await modelKeys.prepareRevoke(instance); prepare.remoteRevoked = existed; }\n- else await modelKeys.ensure(instance);\n+ else return await modelKeys.hire(instance, checkHire, () => invoke(business, verb, args, actor, context));\n return invoke(business, verb, args, actor, context);\n } catch (error) {\n if (isRevoke && prepare.remoteRevoked && (error.code === 'revision-conflict' || error.code === 'revision-conflict-revoked')) modelKeys.revisionConflict(instance);\n- // A failed hire must not leave a newly issued credential usable. Preserve\n- // a revoking intent if remote cleanup fails; boot reconciliation finishes it.\n- if (!isRevoke && !existed && modelKeys.hasRecord(instance)) {\n- try { await modelKeys.prepareRevoke(instance); modelKeys.completeRevoke(instance); } catch {}\n- }\n throw error;\n } finally { pending.delete(business); }\n })();\ndiff --git a/packages/bus/src/runtime.mjs b/packages/bus/src/runtime.mjs\nindex 95Line truncated
"sole3ProductPaths": [
"packages/bus/src/model-keys.mjs",
"packages/bus/src/runtime.mjs",
"packages/business/src/instance-settings.mjs"
],
"testHelperUnchanged": {
"path": "packages/bus/tests/model-hire-ownership-fixture.mjs",
"sha256": "2b989e02be0018f086406aa7d0e51c6eb4397216b4374ecebe0222e0db95056d",
"bytes": 14791,
"gitBlob": "a8da4a87c564aefb125768bd205ac603aac5faa6"
},
"directOld1647Only3Products": true,
"inventoryAdditions": [
{
"path": "agents/magica/work/queue-331/task655-focused-gate.mjs",
"sha256": "113244d9fb95388a97b973fddb73c62f0ae7d2f5fd44d245354dfeb78e8ccb8a",
"bytes": 4364,
"gitBlob": "46d238f67c92c34dd45f8179c7dc3531050e2824"
},
{
"path": "agents/magica/work/queue-331/task655-focused-actual-config.json",
"sha256": "16977a1452aad4b21034a5cc1305dc9f99c9c38a8da0da68f7d69f97359569a9",
"bytes": 3833,
"gitBlob": "7f68080c369e991780ac0731c0d08aa848b5557d"
},
{
"path": "agents/magica/work/queue-331/task655-r2-focused-files.txt",
"sha256": "c6961595c6f87c47fa59f3d95376d0bb5ddc9147ad6630149a8e4671b2cb401f",
"bytes": 1018,
"gitBlob": "2b290b529e36451d7003b45406479de6ad33a723"
},
{
"path": "packages/bus/tests/model-organization-pending.test.mjs",
"sha256": "7d467e21596eb21b2045fdf767913238e5fa891275562262c12d032cd83661b3",
"bytes": 3736,
"gitBlob": "a1265c544843622685277c8f9006888f9743b5da"
},
{
"path": "packages/bus/tests/model-pending-fixture.mjs",
"sha256": "ceb264044e3078cd963c320eb4cdf032d2ca8c3d4c3e8476920977ca281ea927",
"bytes": 8181,
"gitBlob": "f148bb02103193f292c73e459322061b991a3111"
}
],
"additionalExisting654InputsReason": "Required by approvedwhole22 and realimport, not newtest/helper semantic change; both exact testedmapcc/64e.",
"historicalEvidenceUnchanged": [
{
"path": "agents/magica/work/queue-331/task655-focused-prepared-manifest.json",
"sha256": "3055a771f84c1944c39d4dd98190717c95b4f85012d85874ee801b690481d0e3",
"bytes": 10250,
"gitBlob": "6c5ffe3ffb38202e1e848ea9271af8d6133b79a9"
},
{
"path": "agents/magica/work/queue-331/task655-pre-fix-r2-result-manifest.json",
"sha256": "e219846cfd87f35a1faea2ad25841c633ed020c814fe0ab29913794f2eaf145a",
"bytes": 3006,
"gitBlob": "05aefea0f702af896e00e3cb01ba1a2c9e7b9fec"
},
{
"path": "agents/magica/work/queue-331/task655-pre-fix-result-manifest.json",
"sha256": "068b440883fcfcfb9ce4482fee6324f855fb336d8a8e89126f587f9444ceeda7",
"bytes": 3027,
"gitBlob": "f01155ae27a95f4b071fafc3a5aeebf1fd640e96"
},
{
"path": "agents/magica/work/queue-331/task653-focused-tested-commit-map.json",
"sha256": "93ae2eda9060f4495c4622588eee7cc7979331793d9e10ea0f9010f0feeb2b86",
"bytes": 400603,
"gitBlob": "f77e6d1c60cee135823ae492900a854f525d60a1"
},
{
"path": "agents/magica/work/queue-331/task654-current-tested-commit-map.json",
"sha256": "cc65195135c7ab14eded0ed6b9d42f9f2066e0f357d969424632e529e48121ff",
"bytes": 399644,
"gitBlob": "639476bbe060ed39ee362e4f27228af0ba434be3"
}
]
}
@@ -0,0 +1,76 @@
{
"status": "ACTUAL APPLIED UNTESTED; parent inspection and separate actual CLEAR required",
"baseHEAD": "36cef3b62cb20c44224164162a3f1d888d731cae",
"patch": {
"path": "agents/magica/work/queue-331/task655-r2-contract-proposed.diff",
"sha256": "ef299c54b44ba87fae00bdeb8dcbd573bf83605a36f91fcc9ef308f5a2d13cdd",
"bytes": 6978,
"gitBlob": "fe6ddf3c3b6e7980c32ac132537a057246f6c7a9"
},
"virtualOnlyProducts": [
{
"path": "packages/business/src/instance-settings.mjs",
"sha256": "09f2bde85a6d7a8f0b1d1c60ac589b845b0c95e991b2f807758878416b13c6bd",
"bytes": 29910,
"gitBlob": "25828527e0ea1177392215b78ff099a6662ffdb1"
},
{
"path": "packages/bus/src/runtime.mjs",
"sha256": "9566f1d356d02b380373a450fe10e8f8a913092e698cc106496512b0f1a04f60",
"bytes": 54359,
"gitBlob": "dbb920ee3710469e8bd825c82591117c1855fbc0"
},
{
"path": "packages/bus/src/model-keys.mjs",
"sha256": "81480954810f63d79d51ee6e95033dd15a6413bd9c242edabb65b289ecf90368",
"bytes": 15488,
"gitBlob": "f6e3ff8106b2d624fd64e5c72f1e9b1180bc2f30"
}
],
"whole22": [
"packages/bus/tests/model-hire-ownership.test.mjs",
"packages/bus/tests/model-organization-pending.test.mjs",
"packages/bus/tests/model-keys.test.mjs",
"packages/bus/tests/model-orphan-admission.test.mjs",
"packages/bus/tests/model-orphan-hire.test.mjs",
"packages/bus/tests/model-stop.test.mjs",
"packages/bus/tests/model-proxy.test.mjs",
"packages/bus/tests/model-restart.test.mjs",
"packages/bus/tests/model-retirement-boundary.test.mjs",
"packages/bus/tests/model-key-provenance.test.mjs",
"packages/bus/tests/model-key-loss-interaction.test.mjs",
"packages/bus/tests/model-historical-cleanup.test.mjs",
"packages/bus/tests/model-historical-ipc.test.mjs",
"packages/bus/tests/chief-of-staff.test.mjs",
"packages/bus/tests/broker.test.mjs",
"packages/cli/tests/model-managed-launch.test.mjs",
"packages/cli/tests/launcher.test.mjs",
"packages/cli/tests/session-launch.test.mjs",
"packages/seat/tests/session.test.mjs",
"packages/seat/tests/sandbox.test.mjs",
"packages/business/tests/instance-settings.test.mjs",
"packages/business/tests/instance-credential-transitions.test.mjs"
],
"command": "MOSAIC_GATE_CLEAR=<actualCLEAR> nice -n 19 node /home/jwoltje/.t3/worktrees/mosaic-stack/magica-row331/agents/magica/work/queue-331/task655-focused-gate.mjs",
"actualExecutableExists": true,
"driverOnlyChanges": "comment/events/receipts/list/count22 versus existingr2driver, controls unchanged",
"flags": [
"--test",
"--test-reporter=tap",
"absolute whole serial"
],
"budgets": "same test30s/client5s/gatecleanup5s/wait15s/outer0; old tests/deadlines unchanged",
"measurement": "strict realdriver19+testchild19 withstart/enduptime/load/privateHOMEconfigTMPDIR",
"acceptance": "ALL22wholefilesPASSnonskip; firstunexpectedfail/skip/cancel/unavailable/timeout/code/history/cleanup stops/no retry",
"firstFile": "NEWownership18 mustALLPASS; no pre-fix aftertargetclaims",
"commit": "ONLYaftercompleteapplicableGREEN; mapALLfrozencontenttocommit BEFORElateredits; drafts656excluded",
"scope": "no automaticfull/mutants/review/queue/global/closure; existingmaps oldREDunexpected distinct",
"ownerScope": "Mos1738/Sage4748 exactef299 three-path application ONLY",
"historicalMappings": "653/654 and pre-fix1647 old product rows intentionally diverge only these3approvedpaths; historical artifacts unchanged",
"consumedList": {
"path": "agents/magica/work/queue-331/task655-r2-focused-files.txt",
"sha256": "c6961595c6f87c47fa59f3d95376d0bb5ddc9147ad6630149a8e4671b2cb401f",
"bytes": 1018,
"gitBlob": "2b290b529e36451d7003b45406479de6ad33a723"
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,236 @@
{
"status": "ACTUAL READY FOR INSPECTION ONLY; source3UNCOMMITTED/UNTESTED; no executionCLEAR",
"baseHEAD": "36cef3b62cb20c44224164162a3f1d888d731cae",
"artifacts": [
{
"path": "agents/magica/work/queue-331/task655-focused-gate.mjs",
"sha256": "113244d9fb95388a97b973fddb73c62f0ae7d2f5fd44d245354dfeb78e8ccb8a",
"bytes": 4364,
"gitBlob": "46d238f67c92c34dd45f8179c7dc3531050e2824"
},
{
"path": "agents/magica/work/queue-331/task655-r2-focused-files.txt",
"sha256": "c6961595c6f87c47fa59f3d95376d0bb5ddc9147ad6630149a8e4671b2cb401f",
"bytes": 1018,
"gitBlob": "2b290b529e36451d7003b45406479de6ad33a723"
},
{
"path": "agents/magica/work/queue-331/task655-focused-actual-config.json",
"sha256": "16977a1452aad4b21034a5cc1305dc9f99c9c38a8da0da68f7d69f97359569a9",
"bytes": 3833,
"gitBlob": "7f68080c369e991780ac0731c0d08aa848b5557d"
},
{
"path": "agents/magica/work/queue-331/task655-focused-actual-frozen.json",
"sha256": "80e37162303be2bc9599cad117684ddf023a9cdfcd5aebd6960708b88e2d8b86",
"bytes": 408084,
"gitBlob": "cbbfaced209c38b5b807dcea5af95b029c2d96f3"
},
{
"path": "agents/magica/work/queue-331/task655-focused-actual-products.json",
"sha256": "adc00b746a52ac625af4a9fc53b18743403306a998d411f4926bfc4a891e1759",
"bytes": 5387,
"gitBlob": "08af063952cb757e0368dcd0dea58d66c2e2a139"
},
{
"path": "agents/magica/work/queue-331/task655-focused-actual-comparison.json",
"sha256": "3c2f14c594abeb11e05b9574241633a495962cfc1d563aa7d05762861e0900ce",
"bytes": 11441,
"gitBlob": "b624d271be131fcd9df4d38eb24f6e58a29d5c8d"
},
{
"path": "agents/magica/work/queue-331/task655-focused-prepared-manifest.json",
"sha256": "3055a771f84c1944c39d4dd98190717c95b4f85012d85874ee801b690481d0e3",
"bytes": 10250,
"gitBlob": "6c5ffe3ffb38202e1e848ea9271af8d6133b79a9"
},
{
"path": "agents/magica/work/queue-331/task655-pre-fix-r2-result-manifest.json",
"sha256": "e219846cfd87f35a1faea2ad25841c633ed020c814fe0ab29913794f2eaf145a",
"bytes": 3006,
"gitBlob": "05aefea0f702af896e00e3cb01ba1a2c9e7b9fec"
},
{
"path": "agents/magica/work/queue-331/task655-pre-fix-result-manifest.json",
"sha256": "068b440883fcfcfb9ce4482fee6324f855fb336d8a8e89126f587f9444ceeda7",
"bytes": 3027,
"gitBlob": "f01155ae27a95f4b071fafc3a5aeebf1fd640e96"
}
],
"frozenCount": 1652,
"tests22": [
{
"path": "packages/bus/tests/model-hire-ownership.test.mjs",
"sha256": "cdc7001973d5d88b6e02280431512cf207ff54f9988a2417d14ceeabf0396779",
"bytes": 9852,
"gitBlob": "cf94a470ae33e6ba8e5682b404e3c1719cad2bb7"
},
{
"path": "packages/bus/tests/model-organization-pending.test.mjs",
"sha256": "7d467e21596eb21b2045fdf767913238e5fa891275562262c12d032cd83661b3",
"bytes": 3736,
"gitBlob": "a1265c544843622685277c8f9006888f9743b5da"
},
{
"path": "packages/bus/tests/model-keys.test.mjs",
"sha256": "6986c8e290749b9f8f861c8c8d1b39f610131142482842e4834e3c6d48772040",
"bytes": 21117,
"gitBlob": "fd2a6c5d5448d9513e9102a1da14deb99327a641"
},
{
"path": "packages/bus/tests/model-orphan-admission.test.mjs",
"sha256": "c5e5c1239bee252dca7ab0089105f0f3719824dcbae3013d82b4a5ba74aa1e6f",
"bytes": 5740,
"gitBlob": "2856ecb2443b61efc972179be4ef9b38fb0e3c39"
},
{
"path": "packages/bus/tests/model-orphan-hire.test.mjs",
"sha256": "d2070945a6603cff4b7dfe98cc9026c9fc28419b2605a4ff904da48406b317ae",
"bytes": 5522,
"gitBlob": "981c17154942193101aaa88b0a9c9c12f8b0f5d6"
},
{
"path": "packages/bus/tests/model-stop.test.mjs",
"sha256": "cb4f72afc070d86fc10c9fb410b03969341f3d7015da6ebaaec5ea1f780899ae",
"bytes": 2056,
"gitBlob": "a580b2dc26730ab179e393ca030ba2afdf8cddf9"
},
{
"path": "packages/bus/tests/model-proxy.test.mjs",
"sha256": "adcc349357f4ac89956a6bc503af5730b03bfff1ffff20fb07bcdb4d247cbd72",
"bytes": 5206,
"gitBlob": "e4fd74beee011ff5a9eeb599a7b4e98c4abac2ac"
},
{
"path": "packages/bus/tests/model-restart.test.mjs",
"sha256": "daf5997cdb367388c1b79ff9392c33ce203d16bec2dc5b351dcb18497fdeb656",
"bytes": 10810,
"gitBlob": "e322cb862c1b1b60b4b1d01eb304a67b21df3f72"
},
{
"path": "packages/bus/tests/model-retirement-boundary.test.mjs",
"sha256": "5d2ed538b6db01530b4365675cf664ebee523ffb8ce853d58b635a7373917231",
"bytes": 5231,
"gitBlob": "b19683caee716a4c72e520c043adfc5edecb2645"
},
{
"path": "packages/bus/tests/model-key-provenance.test.mjs",
"sha256": "c1b24468e8220db6d881945fd5730f6c673dca84c14f179e9a74338c2b0ed9af",
"bytes": 6593,
"gitBlob": "420bdddaf8207634bad83970a6152f9df080a42d"
},
{
"path": "packages/bus/tests/model-key-loss-interaction.test.mjs",
"sha256": "a9573572cba4ca747cebec232bfa39c744ab7df13fbe1876a19139d2ace0ebf7",
"bytes": 8003,
"gitBlob": "4bee0ffef08b5457d12cfb957b1e2f128f88da8c"
},
{
"path": "packages/bus/tests/model-historical-cleanup.test.mjs",
"sha256": "ce5f042304949d1aed85db003038059bbc3dae6dd7e915a1322db31c81eef8c9",
"bytes": 8104,
"gitBlob": "b0290358fff05de77ff6245501ff6aa1c26b1990"
},
{
"path": "packages/bus/tests/model-historical-ipc.test.mjs",
"sha256": "a5ad060fc9636aab1e142dedfff430f8955fbd6d0a67c9ebdf2062ac72cbdaf2",
"bytes": 7718,
"gitBlob": "95bbf968cadcf1df1825d572b9fe84b2823b9a8c"
},
{
"path": "packages/bus/tests/chief-of-staff.test.mjs",
"sha256": "f1dfd3a18e1101d052cd6d45b5e8fd7fbb0117c049a2c862392a85e295502f91",
"bytes": 66435,
"gitBlob": "8186994f85a4d36c50bbe004b53a2c8888574719"
},
{
"path": "packages/bus/tests/broker.test.mjs",
"sha256": "4510347422fb79b96e60f00a140b429e0f5874e37723effc4f0f77d9f11cc600",
"bytes": 19276,
"gitBlob": "6e5beea08c3036e2ae9ae19f94ed027ac3d61522"
},
{
"path": "packages/cli/tests/model-managed-launch.test.mjs",
"sha256": "9719f1b1437ae306b0760c2d2af55cf796daec99e0205be45baa747f3f69f261",
"bytes": 4992,
"gitBlob": "74939c68891cf5f60857eba454fb0eac2884a98c"
},
{
"path": "packages/cli/tests/launcher.test.mjs",
"sha256": "8d4370f0015e5d9c316358e2d849f9484894eb5408f25e4c7387d971d2f0eca3",
"bytes": 70037,
"gitBlob": "766bbb35a05ab4404eedb6e3f5f8a825b8242539"
},
{
"path": "packages/cli/tests/session-launch.test.mjs",
"sha256": "213dcafa89d96a9cbaaa7f1580cf6b491ed647c4b228f128c8e7e93407270da1",
"bytes": 22023,
"gitBlob": "ea81c8e5fa909fb54c6728c9ea3d94f9b6df5d43"
},
{
"path": "packages/seat/tests/session.test.mjs",
"sha256": "193bacdc74b7793477313d51cc49eb2eec944906c7c5e092f2dd739b21afcdff",
"bytes": 16883,
"gitBlob": "08b3d051ca7b71557f5f7a7af27660fd6064428d"
},
{
"path": "packages/seat/tests/sandbox.test.mjs",
"sha256": "0def1344345fe5fd719b8548ddc115d1ba581577294179a3996cb6f39dd5088a",
"bytes": 23701,
"gitBlob": "df42bacdda9fac12b7dbbde627d99204c9452efe"
},
{
"path": "packages/business/tests/instance-settings.test.mjs",
"sha256": "0746c639a4149f5b1731f4392791d626d8b339bbb2647807c9c1a572bb30858f",
"bytes": 29641,
"gitBlob": "54c22e0e0eff2a2a7136e27a860e43277437afbf"
},
{
"path": "packages/business/tests/instance-credential-transitions.test.mjs",
"sha256": "b645c946e50add7a9114a5a5096e19ccb03064ca66a7ec8948ded07a3f2d23d5",
"bytes": 4299,
"gitBlob": "d72f86778934f62d5d2f4d7e37a4545c5a260ad4"
}
],
"approvedAppliedVirtualProducts": [
{
"path": "packages/business/src/instance-settings.mjs",
"sha256": "09f2bde85a6d7a8f0b1d1c60ac589b845b0c95e991b2f807758878416b13c6bd",
"bytes": 29910,
"gitBlob": "25828527e0ea1177392215b78ff099a6662ffdb1"
},
{
"path": "packages/bus/src/runtime.mjs",
"sha256": "9566f1d356d02b380373a450fe10e8f8a913092e698cc106496512b0f1a04f60",
"bytes": 54359,
"gitBlob": "dbb920ee3710469e8bd825c82591117c1855fbc0"
},
{
"path": "packages/bus/src/model-keys.mjs",
"sha256": "81480954810f63d79d51ee6e95033dd15a6413bd9c242edabb65b289ecf90368",
"bytes": 15488,
"gitBlob": "f6e3ff8106b2d624fd64e5c72f1e9b1180bc2f30"
}
],
"newHelper": {
"path": "packages/bus/tests/model-hire-ownership-fixture.mjs",
"sha256": "2b989e02be0018f086406aa7d0e51c6eb4397216b4374ecebe0222e0db95056d",
"bytes": 14791,
"gitBlob": "a8da4a87c564aefb125768bd205ac603aac5faa6"
},
"existing654InputsAdditionalPins": [
{
"path": "packages/bus/tests/model-organization-pending.test.mjs",
"sha256": "7d467e21596eb21b2045fdf767913238e5fa891275562262c12d032cd83661b3",
"bytes": 3736,
"gitBlob": "a1265c544843622685277c8f9006888f9743b5da"
},
{
"path": "packages/bus/tests/model-pending-fixture.mjs",
"sha256": "ceb264044e3078cd963c320eb4cdf032d2ca8c3d4c3e8476920977ca281ea927",
"bytes": 8181,
"gitBlob": "f148bb02103193f292c73e459322061b991a3111"
}
],
"productCommitOnlyAfterCompleteApplicableGREEN": true
}
@@ -0,0 +1,147 @@
{
"baseline9": [
{
"path": "packages/cli/src/model-stall.mjs",
"sha256": "0bdc91dcaa096bd3dc9d08a1dea59893a21f6505c843e698ad9c8daa4b74364b",
"bytes": 2585,
"gitBlob": "2e57cbb9bdbe0e1ee15a848818077167cc7ac1ed"
},
{
"path": "packages/harness/src/first-output.mjs",
"sha256": "6263d358bc6222948242a102d3196727b3cc14a1cc5d02a4fb06f9dc1291d764",
"bytes": 1359,
"gitBlob": "db3b19ceec2b5619b3b18bdb8f173098ec1f8d72"
},
{
"path": "packages/harness/src/runner.mjs",
"sha256": "d4bfea03e7a4f9cb7a5a8515afd32d3b567d95e9aa4234518648a1ed152bc484",
"bytes": 32515,
"gitBlob": "575ae66a9100d4e6dc18898d493524d89d79f1c1"
},
{
"path": "packages/cli/src/launcher.mjs",
"sha256": "373d4c028dfa6d85c748d56f56359789fe2b81987f522ac23747fd37bb5478ed",
"bytes": 68871,
"gitBlob": "556f09c69bee2278df317f428e0fc3b71ca00f9d"
},
{
"path": "packages/seat/src/sandbox.mjs",
"sha256": "a203f7bb2735e4abeb0758c7719022545696b35f00d7943144b73aa892091807",
"bytes": 10764,
"gitBlob": "ed4550c6e7b52e00b4302a94b24cf4242cd8797e"
},
{
"path": "packages/bus/src/model-keys.mjs",
"sha256": "815b92c8e0b7b6eca8495ea745c0ec7cfdc91296a44d9b0a62b94ed9b5bc9e1d",
"bytes": 14617,
"gitBlob": "0bb21e09fe8e4387741d367ca9447e2757d5b10c"
},
{
"path": "packages/bus/src/runtime.mjs",
"sha256": "c34497a1b1b009f7de156dcc7867e25f1b3afc4a876eed01f319d335a229a6a3",
"bytes": 54200,
"gitBlob": "956ffe7e243ad611efa76ada6eca58c5f441b219"
},
{
"path": "packages/bus/src/broker.mjs",
"sha256": "7ae9c3cef21024bebf32bd0c8af861a64d39b0137e8ba5899612004dd898b33c",
"bytes": 407085,
"gitBlob": "5ad4a0edccd539390411a7f70737cbe2f2f6cccf"
},
{
"path": "packages/bus/src/process.mjs",
"sha256": "ed13afdce6359df31d35a79496ebb4afdefef82030a8326a76b2a25b37e98d9d",
"bytes": 7150,
"gitBlob": "955a147c9d2c313fdee81b56f5faff4dcb4976bc"
}
],
"current9": [
{
"path": "packages/cli/src/model-stall.mjs",
"sha256": "0bdc91dcaa096bd3dc9d08a1dea59893a21f6505c843e698ad9c8daa4b74364b",
"bytes": 2585,
"gitBlob": "2e57cbb9bdbe0e1ee15a848818077167cc7ac1ed"
},
{
"path": "packages/harness/src/first-output.mjs",
"sha256": "6263d358bc6222948242a102d3196727b3cc14a1cc5d02a4fb06f9dc1291d764",
"bytes": 1359,
"gitBlob": "db3b19ceec2b5619b3b18bdb8f173098ec1f8d72"
},
{
"path": "packages/harness/src/runner.mjs",
"sha256": "d4bfea03e7a4f9cb7a5a8515afd32d3b567d95e9aa4234518648a1ed152bc484",
"bytes": 32515,
"gitBlob": "575ae66a9100d4e6dc18898d493524d89d79f1c1"
},
{
"path": "packages/cli/src/launcher.mjs",
"sha256": "373d4c028dfa6d85c748d56f56359789fe2b81987f522ac23747fd37bb5478ed",
"bytes": 68871,
"gitBlob": "556f09c69bee2278df317f428e0fc3b71ca00f9d"
},
{
"path": "packages/seat/src/sandbox.mjs",
"sha256": "a203f7bb2735e4abeb0758c7719022545696b35f00d7943144b73aa892091807",
"bytes": 10764,
"gitBlob": "ed4550c6e7b52e00b4302a94b24cf4242cd8797e"
},
{
"path": "packages/bus/src/model-keys.mjs",
"sha256": "81480954810f63d79d51ee6e95033dd15a6413bd9c242edabb65b289ecf90368",
"bytes": 15488,
"gitBlob": "f6e3ff8106b2d624fd64e5c72f1e9b1180bc2f30"
},
{
"path": "packages/bus/src/runtime.mjs",
"sha256": "9566f1d356d02b380373a450fe10e8f8a913092e698cc106496512b0f1a04f60",
"bytes": 54359,
"gitBlob": "dbb920ee3710469e8bd825c82591117c1855fbc0"
},
{
"path": "packages/bus/src/broker.mjs",
"sha256": "7ae9c3cef21024bebf32bd0c8af861a64d39b0137e8ba5899612004dd898b33c",
"bytes": 407085,
"gitBlob": "5ad4a0edccd539390411a7f70737cbe2f2f6cccf"
},
{
"path": "packages/bus/src/process.mjs",
"sha256": "ed13afdce6359df31d35a79496ebb4afdefef82030a8326a76b2a25b37e98d9d",
"bytes": 7150,
"gitBlob": "955a147c9d2c313fdee81b56f5faff4dcb4976bc"
}
],
"businessBaseline": {
"path": "packages/business/src/instance-settings.mjs",
"sha256": "f9d2d88b3ba53acd5ac51014f57db83ded428bd072a4ab68a9c2f87418030edd",
"bytes": 29562,
"gitBlob": "a7035298a7c6e8bf4189a365148421f7d262be2d"
},
"businessCurrent": {
"path": "packages/business/src/instance-settings.mjs",
"sha256": "09f2bde85a6d7a8f0b1d1c60ac589b845b0c95e991b2f807758878416b13c6bd",
"bytes": 29910,
"gitBlob": "25828527e0ea1177392215b78ff099a6662ffdb1"
},
"virtualApproved": [
{
"path": "packages/business/src/instance-settings.mjs",
"sha256": "09f2bde85a6d7a8f0b1d1c60ac589b845b0c95e991b2f807758878416b13c6bd",
"bytes": 29910,
"gitBlob": "25828527e0ea1177392215b78ff099a6662ffdb1"
},
{
"path": "packages/bus/src/runtime.mjs",
"sha256": "9566f1d356d02b380373a450fe10e8f8a913092e698cc106496512b0f1a04f60",
"bytes": 54359,
"gitBlob": "dbb920ee3710469e8bd825c82591117c1855fbc0"
},
{
"path": "packages/bus/src/model-keys.mjs",
"sha256": "81480954810f63d79d51ee6e95033dd15a6413bd9c242edabb65b289ecf90368",
"bytes": 15488,
"gitBlob": "f6e3ff8106b2d624fd64e5c72f1e9b1180bc2f30"
}
],
"independentScratchEqualsActual": true
}
@@ -0,0 +1,55 @@
// Task655 proposed focused22 after exactef299 application; NOT actual execution authority.
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
import vm from 'node:vm';
import { createHash } from 'node:crypto';
import { execFileSync, spawn } from 'node:child_process';
const root=process.cwd(),home=path.join(root,'agents/magica/work/queue-331');
os.setPriority(0,19);
const archive=execFileSync('mktemp',['-d','/mnt/storage/scratch/tmp/XXXXXX'],{encoding:'utf8'}).trim();
const events=path.join(home,'task655-focused-events.jsonl'),receipt=path.join(home,'task655-focused-receipts.json');
const candidate=execFileSync('git',['rev-parse','HEAD'],{encoding:'utf8'}).trim();
fs.writeFileSync(events,'',{flag:'wx'});
const rows=[];
const uptime=()=>execFileSync('uptime',[],{encoding:'utf8'}).trim();
const logEvent=e=>fs.appendFileSync(events,JSON.stringify(e)+'\n');
const hash=b=>createHash('sha256').update(b).digest('hex');
async function step(name,command,args,timeout=0){
const temp=execFileSync('mktemp',['-d','/mnt/storage/scratch/tmp/XXXXXX'],{encoding:'utf8'}).trim();
fs.mkdirSync(path.join(temp,'home'));fs.mkdirSync(path.join(temp,'config'));
const env={...process.env,TMPDIR:temp,HOME:path.join(temp,'home'),MOSAIC_CONFIG:path.join(temp,'config/config.json')};
for(const key of ['OPENAI_API_KEY','ANTHROPIC_API_KEY','ANTHROPIC_AUTH_TOKEN','CLAUDE_CODE_OAUTH_TOKEN','OPENROUTER_API_KEY','ZAI_API_KEY','MOSAIC_BUS_CAP'])delete env[key];
os.setPriority(0,19);
const before={name,event:'start',at:new Date().toISOString(),uptime:uptime(),TMPDIR:temp,nice:os.getPriority(0)};
logEvent(before);
const file=path.join(archive,String(rows.length+1).padStart(3,'0')+'-'+name.replaceAll('/','_')+'.log');
const fd=fs.openSync(file,'wx',0o600);
os.setPriority(0,19);
const measuredDriverNice=os.getPriority(0);fs.writeSync(fd,'driverNice='+measuredDriverNice+'\n');
let timer,timedOut=false;
const child=spawn(command,args,{cwd:root,env,stdio:['ignore',fd,fd]});
let measuredChildNice=null;
if(child.pid){os.setPriority(child.pid,19);measuredChildNice=os.getPriority(child.pid);}
fs.writeSync(fd,'nice='+String(measuredChildNice)+'\n');fs.closeSync(fd);
if(timeout)timer=setTimeout(()=>{timedOut=true;child.kill('SIGTERM');},timeout);
const outcome=await new Promise(resolve=>{child.once('error',error=>resolve({rc:1,error:error.code}));child.once('close',(code,signal)=>resolve({rc:code??1,signal}));});
clearTimeout(timer);
const endLoad=uptime(),bytes=fs.readFileSync(file),text=bytes.toString();
const count=key=>Number(new RegExp('^# '+key+' (\\d+)$','m').exec(text)?.[1]??0);
const shell=/selftest: (\d+) passed, (\d+) failed/.exec(text);
const row={...before,measuredDriverNice,measuredChildNice,event:'end',endAt:new Date().toISOString(),endUptime:endLoad,...outcome,timedOut,
tests:shell?Number(shell[1])+Number(shell[2]):count('tests'),pass:shell?Number(shell[1]):count('pass'),fail:shell?Number(shell[2]):count('fail'),skipped:count('skipped'),cancelled:count('cancelled'),
failedNames:text.split('\n').filter(s=>s.startsWith('not ok ')).map(s=>s.replace(/^not ok \d+ - /,'')),log:{path:file,sha256:hash(bytes),bytes:bytes.length}};
rows.push(row);logEvent(row);fs.writeFileSync(receipt,JSON.stringify({clear:process.env.MOSAIC_GATE_CLEAR??'not supplied',candidate,archive,rows},null,2)+'\n');
process.stdout.write(`${name} rc=${row.rc} pass=${row.pass} fail=${row.fail} skip=${row.skipped} start=[${row.uptime}] end=[${endLoad}]\n`);
if(measuredDriverNice!==19||measuredChildNice!==19)throw Error('priority-refused '+name);
return row;
}
const testArgs=file=>['--test','--test-reporter=tap',path.join(root,file)];
try {
const list=fs.readFileSync(path.join(home,'task655-r2-focused-files.txt'),'utf8').trim().split('\n');
if(list.length!==22||list[0]!=='packages/bus/tests/model-hire-ownership.test.mjs')throw Error('whole-file list mismatch');
for(const file of list){const row=await step(file,process.execPath,testArgs(file));if(row.rc!==0)throw Error('RED '+file);if(row.skipped||row.cancelled||row.timedOut)throw Error('UNEXPECTED '+file);}
logEvent({event:'complete',at:new Date().toISOString(),uptime:uptime()});
}catch(error){logEvent({event:'stopped',reason:error.message,at:new Date().toISOString(),uptime:uptime()});process.stdout.write(error.message+'\n');process.exitCode=1;}