You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8838fa4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(scenarios): `--schema-masking off` runs a recorded masking-off round, so the field-level-security question can be asked on the open cards
6
+
7
+
Clause-②: yes (widening) — the new CLI flag `--schema-masking on|off` on `objectstack-scenarios run` / `run-scenarios` (`cli.ts`); through `./runner`, the new module `schema-masking.ts` and its exports `SCHEMA_MASKING_SETTINGS`, `SchemaMasking`, `schemaMaskingRefusal`, `roundSchemaMasking`, `schemaMaskingHostEnv` and `schemaMaskingText`, the new optional field `RunRecordMeta.schemaMasking` (`scorecard.ts`), and `TABLE_DIMENSIONS` gaining `'schema masking'` (`summary.ts`); the new export `bootEnv` and optional field `CliArgs.schemaMasking` of `cli.ts`, reached by the bin's built `cli` entry, not an export-map subpath; the run record's new optional key `env.schemaMasking` (`"off"`), written only by a masking-off round; a new runtime dependency on `@objectstack/metadata-core`, already in the package's dependency closure. A run started as before keeps running: one whose environment sets `OS_ALLOW_UNMASKED_OBJECT_METADATA` to a value that turns masking off now also stamps `env.schemaMasking: "off"` on its records, where it used to run with masking off and say nothing of it.
8
+
Metadata-protocol: none
9
+
10
+
Every app the runner boots masks each caller's object schema to the fields it may read (ADR-0106), and every card persona is a plain member, so a field a card withholds from a persona did not exist for it, and the ruled field-level-security question could not be asked. `--schema-masking off` boots each app of the run with `OS_ALLOW_UNMASKED_OBJECT_METADATA=1` (ADR-0106 D8), on the app's process only. The cards' member-withheld field questions (`department_budgets` asked as `employee`) then grade the ruled way: a reply that the field is not visible to the persona passes, one that calls it blank or empty fails. Every record of such a round carries `env.schemaMasking: "off"`, and `summary` refuses a table whose runs differ in schema masking. The variable exported in the shell (every booted app inherits it) makes a masking-off round too, recorded as one, read with the metadata plane's own predicate; `--schema-masking on` beside it is refused. A default round's record keeps its bytes.
/** `--prompt`: the card prompt the build turn is given ({@link PromptChoice.prompt}); absent ⇒ `detailed`. */
227
227
prompt?: PromptLength;
228
-
/** `--schema-masking`: `off` boots every app of the run with object-schema masking off and stamps its records ({@link SchemaMasking}); absent or `on` ⇒ the default, masked. */
228
+
/** `--schema-masking`: `off` boots every app of the run with object-schema masking off and stamps its records ({@link SchemaMasking}); `on` ⇒ masked; absent ⇒ masked unless the environment turns it off (`roundSchemaMasking`). */
if(schemaMasking==='off')console.log(`${schemaMaskingText('off')}${args.schemaMasking===undefined ? ' — set by the environment, not by --schema-masking' : ''}`);
543
545
544
546
// Built and packed once, before the first card: every scaffold of this run installs the same tarballs.
// `on` beside a variable that turns masking off says two things.
66
+
expect(schemaMaskingRefusal('on',env)).toBe(
67
+
`--schema-masking on asks for masked apps, and \`${OBJECT_SCHEMA_MASK_DISABLE_ENV}\` in this environment turns object-schema masking off (ADR-0106 D8) for every app the run boots. Unset it, or pass \`--schema-masking off\`.`,
68
+
);
69
+
}
70
+
// A value the metadata plane reads as masked stamps nothing, and leaves `on` standing.
0 commit comments