salvage 2026-11-06: uncommitted work from scratch/darkwing-scratch/r155/wt2 (disk cleanup #824)
This commit is contained in:
1 parent
99d2b49c9c
commit
ee0b7b0773
31 files changed
+804
-106
No files matched your search
@@ -789,7 +789,13 @@ The WebUI (S5).
|
||||
selection, limits and running counts. `mosaic limits set --business ID
|
||||
--file PATCH` submits JSON with the read's `revision` and any of `limits`,
|
||||
`models`, `instances`. `limits` and `models` replace those entire objects;
|
||||
`instances` maps role instance names to model-table keys. Both commands use
|
||||
`instances` maps role instance names to model-table keys. `assistants` maps
|
||||
an assistant instance to any of its `vars`, `tracker` and `definition`; each
|
||||
given field replaces that field, and `tracker: null` removes the tracker.
|
||||
The definition stays an assistant one, and `holder` and `credentials` stay
|
||||
hand edits (row 155, Q169). The chief of staff sends the same patch with
|
||||
`change_organization`; until row 134 gives it a read, the revision comes from
|
||||
the human. Both commands use
|
||||
the existing human proof and broker; neither is available to a managed role
|
||||
or tester. The Console Settings form uses the same write path and requires
|
||||
signed-in send mode, named Host, exact Origin and same-origin Fetch Metadata.
|
||||
|
||||
@@ -6,8 +6,10 @@ import { systemVars } from "../../business/src/index.mjs";
|
||||
import { CliError } from "./errors.mjs";
|
||||
import { migrateLaunch } from "../../business/src/migrate-launch.mjs";
|
||||
|
||||
// Row 155 (#1649, Q169): a PATCH may carry `assistants`, the assistant's vars, tracker and definition.
|
||||
export const LIMITS_USAGE = "mosaic limits [--business ID] [--json] | set --file PATCH [--business ID] | " +
|
||||
"migrate --file ORGANIZATION --models MAPPING [--roles-dir DIR]";
|
||||
"migrate --file ORGANIZATION --models MAPPING [--roles-dir DIR]; PATCH keys: revision, limits, models, " +
|
||||
"instances, assistants";
|
||||
|
||||
export function parseLimits(args) {
|
||||
const out = { positional: [], flags: new Set(), values: {} };
|
||||
|
||||
@@ -27,6 +27,15 @@ test('limits view/set use the human bus transport and pass only the explicit pat
|
||||
await assert.rejects(main(['limits','--business','acme'],io({CODEX_THREAD_ID:'fixture-agent'}),deps),/agent/i);assert.equal(calls.length,2);
|
||||
});
|
||||
|
||||
// Row 155 (#1649, Q169): the human configures the assistant with the same command.
|
||||
test('limits set passes an assistants patch through unchanged, and the usage names the key',async t=>{
|
||||
const root=tmp(t),patch={revision:'a'.repeat(64),assistants:{assistant:{vars:{model:'opus',thinking:'high'},tracker:null,definition:'assistant'}}},file=writeJson(join(root,'patch.json'),patch),calls=[];
|
||||
const deps={system:{dataRoot:root},transport:business=>(verb,args)=>{calls.push({business,verb,args});return {revision:'b'.repeat(64)};}};
|
||||
await main(['limits','set','--business','acme','--file',file],io(),deps);
|
||||
assert.deepEqual(calls,[{business:'acme',verb:'limits.set',args:patch}]);
|
||||
await assert.rejects(main(['limits','set','--business','acme'],io(),deps),/PATCH keys: revision, limits, models, instances, assistants/);assert.equal(calls.length,1);
|
||||
});
|
||||
|
||||
test('post-119 example and Jason fixture migrate with checked inherited models; wrong or absent config refuses',async t=>{
|
||||
const {execFileSync}=await import('node:child_process');const {validateBusinessDocument}=await import('../../business/src/business.mjs');
|
||||
const root=tmp(t),f=fixture(root,'acme'),doc=JSON.parse(execFileSync('git',['show','94e41ae29:packages/business/examples/mosaic-stack.example.json'],{encoding:'utf8'}));
|
||||
|
||||
Reference in new issue
Block a user