From f3041de6ae1ab0e0add15aaa6ebf7527caa61bdd Mon Sep 17 00:00:00 2001 From: nik13 <8347993+nik13@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:00:19 -0800 Subject: [PATCH 1/2] test(spec): fail on absolute local paths in the spec and catalog copies Read every file in spec/auto-instrumentation and the two shipped privacy.json copies, and fail if any line names an absolute /Volumes/ or /Users/ path. --- .../test/spec-local-paths.test.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 typescript/packages/traceai_auto/test/spec-local-paths.test.ts diff --git a/typescript/packages/traceai_auto/test/spec-local-paths.test.ts b/typescript/packages/traceai_auto/test/spec-local-paths.test.ts new file mode 100644 index 000000000..7e1b99137 --- /dev/null +++ b/typescript/packages/traceai_auto/test/spec-local-paths.test.ts @@ -0,0 +1,32 @@ +import { readdirSync, readFileSync } from "node:fs"; +import { join, relative, resolve } from "node:path"; + +// The shared spec folder and the catalog copies built from it ship publicly. +// They must not name an absolute path on a developer machine: a macOS volume +// or home directory such as "/Volumes/" or "/Users/". +const root = resolve(__dirname, "../../../.."); +const LOCAL_PATH = /(? { + const path = join(directory, entry.name); + // Interpreter caches are local build output, not part of the spec. + if (entry.isDirectory()) return entry.name === "__pycache__" ? [] : files(path); + return entry.isFile() ? [path] : []; + }); +} + +test("the spec folder and catalog copies contain no absolute local paths", () => { + const scanned = [ + ...files(resolve(root, "spec/auto-instrumentation")), + resolve(root, "typescript/packages/fi-core/src/privacy.json"), + resolve(root, "typescript/packages/traceai_auto/src/wire/privacy.json"), + ]; + expect(scanned.map(path => relative(root, path))).toEqual(expect.arrayContaining([ + "spec/auto-instrumentation/README.md", + "spec/auto-instrumentation/privacy.json", + ])); + const found = scanned.flatMap(path => readFileSync(path, "utf8").split("\n") + .flatMap((line, index) => (LOCAL_PATH.test(line) ? [`${relative(root, path)}:${index + 1}`] : []))); + expect(found).toEqual([]); +}); From 0f068e4332d8106ad5a5f96298d655a8e6253e46 Mon Sep 17 00:00:00 2001 From: nik13 <8347993+nik13@users.noreply.github.com> Date: Fri, 13 Nov 2026 14:04:50 -0800 Subject: [PATCH 2/2] chore: remove internal references from comments and metadata No behaviour change. --- .../agno/tests/test_f2_default_zero.py | 2 +- .../agno/tests/test_privacy_bridge.py | 2 +- .../tests/test_core_modality_contract.py | 2 +- .../tests/test_privacy_and_raw_streams.py | 4 +- python/tests/test_chat_input_leaf_privacy.py | 2 +- python/tests/test_chat_input_privacy.py | 2 +- python/tests/test_granular_payload_privacy.py | 2 +- .../tests/test_image_cap_f2_default_zero.py | 2 +- python/tests/test_image_cap_failclosed_r4.py | 4 +- .../test_image_cap_failclosed_witnesses.py | 2 +- spec/auto-instrumentation/README.md | 12 +++--- .../generate_privacy_fixtures.py | 38 +++++++------------ spec/auto-instrumentation/privacy.json | 17 +-------- typescript/packages/fi-core/README.md | 2 +- .../src/__tests__/base64ImageCap.test.ts | 4 +- .../embedding-model-metadata.test.ts | 2 +- .../g1-hidden-marker-precedence.test.ts | 2 +- .../src/__tests__/i1-composed-privacy.test.ts | 2 +- .../fi-core/src/__tests__/i1-r10-lead.test.ts | 2 +- .../__tests__/imageCapF2DefaultZero.test.ts | 2 +- .../imageCapFailClosedWitnesses.test.ts | 2 +- .../__tests__/imageCapRound4Classes.test.ts | 1 - .../__tests__/piiEmailResourceBound.test.ts | 3 +- .../__tests__/piiQuickCheckSuperset.test.ts | 4 +- .../fi-core/src/__tests__/privacy.test.ts | 2 +- .../privacyRuntimePerfEquivalence.test.ts | 2 +- .../src/__tests__/round6-passA.test.ts | 2 +- .../fi-core/src/__tests__/round6.test.ts | 2 +- .../src/__tests__/sdkCapPiiClassFix.test.ts | 6 +-- .../__tests__/typedImagePositiveCap.test.ts | 2 +- typescript/packages/fi-core/src/privacy.json | 17 +-------- .../src/trace/trace-config/imageCap.ts | 2 +- .../traceai_auto/src/wire/privacy.json | 17 +-------- .../traceai_auto/test/privacy-catalog.test.ts | 2 +- .../traceai_cursor_plugin/test/cli-pack.cjs | 2 +- typescript/packages/traceai_genkit/README.md | 5 +-- .../traceai_mistral/test/attribution.test.cjs | 3 +- .../test/embedding-batch.test.cjs | 3 +- 38 files changed, 62 insertions(+), 122 deletions(-) diff --git a/python/frameworks/agno/tests/test_f2_default_zero.py b/python/frameworks/agno/tests/test_f2_default_zero.py index c387c1fd6..b33ce9f9b 100644 --- a/python/frameworks/agno/tests/test_f2_default_zero.py +++ b/python/frameworks/agno/tests/test_f2_default_zero.py @@ -52,7 +52,7 @@ def test_f2_agno_default_env_and_explicit_positive(monkeypatch): def test_f2_agno_supplied_config_without_cap_resolves_zero(monkeypatch): - # Lead slice (RL 2193): F2-PY-CAP0-COMPLETENESS-001. A config passed only to + # Cap-0 completeness: a config passed only to # set another option carries OI's default cap and must not bypass cap 0. from openinference.instrumentation import TraceConfig as OITraceConfig from traceai_agno._wrappers._privacy import privacy_configs, _PrivacyConfig diff --git a/python/frameworks/agno/tests/test_privacy_bridge.py b/python/frameworks/agno/tests/test_privacy_bridge.py index b7b6850ff..b7b7c73b5 100644 --- a/python/frameworks/agno/tests/test_privacy_bridge.py +++ b/python/frameworks/agno/tests/test_privacy_bridge.py @@ -32,7 +32,7 @@ def test_fi_hides_cannot_be_undone_by_openinference(monkeypatch, name): assert getattr(supplied, name) is False for field in fields(supplied): if field.name == "base64_image_max_length": - # F2 (RL 2310bu): a supplied OI config without an explicit cap resolves to the FI default 0. + # A supplied OI config without an explicit cap resolves to the FI default 0. assert getattr(effective, field.name) == 0 elif field.name != name: assert getattr(effective, field.name) == getattr(supplied, field.name) diff --git a/python/frameworks/fireworks/tests/test_core_modality_contract.py b/python/frameworks/fireworks/tests/test_core_modality_contract.py index 7d31e4814..4ba922c8f 100644 --- a/python/frameworks/fireworks/tests/test_core_modality_contract.py +++ b/python/frameworks/fireworks/tests/test_core_modality_contract.py @@ -64,7 +64,7 @@ def test_core_not_instrumentor_applies_image_mask(monkeypatch): assert type(attrs["input.value"]) is module.ChatInput # Reapply a different policy to the same ORIGINAL typed data. This cannot # work with a package-sanitized string or a boolean assertion of trust. - # F2 (RL 2310bu): retain the original assertions at the former default cap. + # Retain the original assertions at the former default cap. visible = TraceConfig(base64_image_max_length=32_000).mask("input.value", attrs["input.value"]) assert IMAGE in visible and PROMPT in visible hidden = TraceConfig(hide_input_text=True, base64_image_max_length=32_000).mask( diff --git a/python/frameworks/fireworks/tests/test_privacy_and_raw_streams.py b/python/frameworks/fireworks/tests/test_privacy_and_raw_streams.py index d730c8c32..c3894dacd 100644 --- a/python/frameworks/fireworks/tests/test_privacy_and_raw_streams.py +++ b/python/frameworks/fireworks/tests/test_privacy_and_raw_streams.py @@ -24,7 +24,7 @@ def _resolved_default_image_cap(): """The installed core's default cap. The core-floor job installs the oldest supported - fi-instrumentation-otel, whose default is 32000; F2 (RL 2310bu) cores default to 0.""" + fi-instrumentation-otel, whose default is 32000; newer cores default to 0.""" saved = os.environ.pop("FI_BASE64_IMAGE_MAX_LENGTH", None) try: return TraceConfig().base64_image_max_length @@ -89,7 +89,7 @@ def test_image_privacy_every_exported_copy(monkeypatch, asynchronous, env, polic elif policy in ("limit", "boundary"): config["base64_image_max_length"] = len(url) - (policy == "limit") elif policy == "visible": - # F2 (RL 2310bu): the former default is now an explicit opt-in twin. + # The former default is now an explicit opt-in twin. config["base64_image_max_length"] = 32_000 if env: for key, value in config.items(): diff --git a/python/tests/test_chat_input_leaf_privacy.py b/python/tests/test_chat_input_leaf_privacy.py index f7127e64d..f6b6a9567 100644 --- a/python/tests/test_chat_input_leaf_privacy.py +++ b/python/tests/test_chat_input_leaf_privacy.py @@ -39,7 +39,7 @@ def test_case_insensitive_scheme_preserves_original_reference(url, hide, cap): result = json.loads(TraceConfig(**options).mask("input.value", ChatInput(payload))) text, image = result["messages"][0]["content"] assert text["text"] == (REDACTED_VALUE if hide == "hide_input_text" else "visible") - # F2 (RL 2310bu): at the default cap 0 the hidden slot of an image part is an image + # At the default cap 0 the hidden slot of an image part is an image # payload position, so its marker is replaced whole; a positive cap keeps the marker. hidden_image = REDACTED_VALUE if cap else "[image-redacted]" assert image["image_url"] == (hidden_image if hide == "hide_input_images" else {"url": url}) diff --git a/python/tests/test_chat_input_privacy.py b/python/tests/test_chat_input_privacy.py index 6804cbd3c..8f6aa0534 100644 --- a/python/tests/test_chat_input_privacy.py +++ b/python/tests/test_chat_input_privacy.py @@ -68,7 +68,7 @@ def attributes(records): @pytest.mark.parametrize("key", ["input.value", "raw.input"]) @pytest.mark.parametrize("options,hidden", [ - # F2 (RL 2310bu): the default image cap is 0, so the data: image is hidden unless a + # The default image cap is 0, so the data: image is hidden unless a # positive cap is set; each default row keeps a twin at the previous default cap. ({}, [IMAGE]), ({"base64_image_max_length": 32_000}, []), diff --git a/python/tests/test_granular_payload_privacy.py b/python/tests/test_granular_payload_privacy.py index 4a08c77c3..bfd017195 100644 --- a/python/tests/test_granular_payload_privacy.py +++ b/python/tests/test_granular_payload_privacy.py @@ -36,7 +36,7 @@ def test_text_privacy_is_directional(direction, opposite): def test_text_flag_keeps_explicitly_typed_images(): - # F2 (RL 2310bu): the text flag never hides typed images; pinned at the previous + # The text flag never hides typed images; pinned at the previous # default cap. At the default cap 0 a typed image value is an over-cap payload. config = TraceConfig(hide_input_text=True, base64_image_max_length=32_000) assert config.mask("gen_ai.input.images.0", "image-reference") == "image-reference" diff --git a/python/tests/test_image_cap_f2_default_zero.py b/python/tests/test_image_cap_f2_default_zero.py index 44b3054db..36e8f125d 100644 --- a/python/tests/test_image_cap_f2_default_zero.py +++ b/python/tests/test_image_cap_f2_default_zero.py @@ -752,7 +752,7 @@ def test_f2_fixed_marker_remains_protected(): cap_base64_images("ordinary", 0, "[image-redacted]") -# Ruling r2 continuation (LANE-CALL-NIKM4-5A-F2-CAP0-OVERREDACTION-r2): the cap-0 +# The cap-0 # trigger is data:, then image/, then a comma, within one Q1 scope view. diff --git a/python/tests/test_image_cap_failclosed_r4.py b/python/tests/test_image_cap_failclosed_r4.py index 1c0032c52..9ed679163 100644 --- a/python/tests/test_image_cap_failclosed_r4.py +++ b/python/tests/test_image_cap_failclosed_r4.py @@ -1468,7 +1468,7 @@ def test_r4c8_protected_false_flag(): ('r4c8/false_flag/7/array', '["data:image/png;name=\\"x;ba%26#115;e64;y\\",QUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJD","unchanged"]', 0, '["data:image/png;name=\\"x;ba%26#115;e64;y\\",QUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJD","unchanged"]', 0), ) for case_id, value, maximum, expected, count in cases: - # F2 (RL 2310bu, CAP0-OVERREDACTION-r2): cap 0 now redacts every data: image mention; the precise + # Cap 0 now redacts every data: image mention; the precise # false-flag protection is asserted at the strictest positive cap instead. maximum = max(maximum, 1) assert _cap_base64_images_counted(value, maximum, A) == (expected, count), case_id @@ -1547,7 +1547,7 @@ def test_r4c6_lead_ts_lens_witnesses_python_outputs(): assert cap_base64_images(first, 64, A) == first -# Lead slice (RL 2193; F2-PY-PTC-AND-COMPAT P2): the r4c8 inputs whose precise assertions moved to cap 1 +# The r4c8 inputs whose precise assertions moved to cap 1 # keep their cap-0 (F2 default) expectations here: whole Q1 scope [image-redacted], count 1, idempotent. F2_CAP0_R4C8 = ( ('r4c8/false_flag/0/raw', 'data:image/png;base64=ordinary,QUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJDQUJD', '[image-redacted]'), diff --git a/python/tests/test_image_cap_failclosed_witnesses.py b/python/tests/test_image_cap_failclosed_witnesses.py index baecb6357..ade6762d8 100644 --- a/python/tests/test_image_cap_failclosed_witnesses.py +++ b/python/tests/test_image_cap_failclosed_witnesses.py @@ -1,4 +1,4 @@ -"""Fail-closed r4 witness controls (fi-security 628059fc; RL 2310ah). Lead-authored from the fail-closed r3 lens witnesses; RED on the r3 base.""" +"""Fail-closed r4 witness controls, derived from the fail-closed r3 witnesses; they fail on the r3 code.""" from fi_instrumentation.instrumentation._image_cap import cap_base64_images BS = chr(92) diff --git a/spec/auto-instrumentation/README.md b/spec/auto-instrumentation/README.md index 1da863d98..85ec5cf2e 100644 --- a/spec/auto-instrumentation/README.md +++ b/spec/auto-instrumentation/README.md @@ -332,8 +332,8 @@ Every SDK runs every case in `privacy-fixtures.json`. Recognition gaps are fixed a catalog rule applied inconsistently at different sites is an SDK bug. The initial vocabulary is the union of the six SDKs' privacy implementations and missed names -reported in the round-4/5 verdicts. `credentials.sources`, `seed_names`, and -`missed_name_sources` retain the provenance. All seed and missed names have generated cases. +reported in the round-4/5 verdicts. `credentials.sources` and `seed_names` retain the provenance; +`missed_name_sources` groups the missed names by review. All seed and missed names have generated cases. 1. **Credential patterns and exclusions.** ASCII-lowercase names and fold `-`, `_`, and `.`. Match the catalog's `contains` patterns (`token`, `secret`, `key`, `auth`, `password`, @@ -362,7 +362,7 @@ reported in the round-4/5 verdicts. `credentials.sources`, `seed_names`, and `session_token`, `token_secret`, `api_token_latency_key` and `auth_token` remain private. Credential ancestors/descendants still win; timing names are not blanket subtree exemptions. - `credentials.contextual_exclusions` remains empty. RL 2299t's reviewed exception + `credentials.contextual_exclusions` remains empty. The reviewed name-only exception is instead the closed, versioned `logprob_tokens` list and an explicit parsed provider-response entry point, not a name/path heuristic available to every JSON payload. In that context, **logprob tokens are checked against registered secrets and credential shapes, not key-name rules**. @@ -574,7 +574,7 @@ python3 -I spec/auto-instrumentation/sync.py ``` On shared hosts, prefix **every** generator/test/runtime invocation with the host-safety -wrapper `/Volumes/nikm4/futureagi/tmp/traceai-auto-review/heavy.sh` via `bash`. +wrapper that the host provides, if it has one. ### Review follow-up (2026-10-30) @@ -1026,7 +1026,7 @@ implementation, resource preservation or attribute-container admission. ## Node manual and zero-code batching compatibility -RL2299h preserves the manual public API: explicit **or omitted** `batch: false` +The manual public API is preserved: explicit **or omitted** `batch: false` on fi-core `register()` / `FITracerProvider` selects SimpleSpanProcessor. Manual `batch: true` selects bounded BatchSpanProcessor. The zero-code auto agent explicitly constructs BatchSpanProcessor for its owned export route and requests @@ -1046,7 +1046,7 @@ Neither queuing nor successful local handoff proves remote collector acceptance. The shared credential catalog still masks access-key identifiers and untrusted token-named fields. Only the explicitly bound provider-root logprob paths above -use RL 2299t's name-only exception and required reconstruction rule; numeric token +use the reviewed name-only exception and required reconstruction rule; numeric token metrics remain available. Credential values use ``; embedding-vector hiding is a fi-core content policy and uses its dev `__REDACTED__` marker, not a new catalog credential replacement. Generated privacy fixture bundles must be regenerated diff --git a/spec/auto-instrumentation/generate_privacy_fixtures.py b/spec/auto-instrumentation/generate_privacy_fixtures.py index bca217473..14b264ed0 100644 --- a/spec/auto-instrumentation/generate_privacy_fixtures.py +++ b/spec/auto-instrumentation/generate_privacy_fixtures.py @@ -268,31 +268,21 @@ def privacy_catalog(): 'java/traceai-javaagent/src/main/java/ai/traceai/auto/WirePrivacy.java', 'csharp/src/TraceAI.AutoInstrumentation/Wire/WirePrivacy.cs', 'ruby/lib/traceai/auto/privacy.rb'], - 'missed_name_sources': [{'review': 'round4-final-node-r4.txt', - 'names': ['x-goog-api-key', + 'missed_name_sources': [{'names': ['x-goog-api-key', 'anthropic-api-key', 'ocp-apim-subscription-key']}, - {'review': 'round4-final-csharp-r4.txt', - 'names': ['authorization_token', 'client_secret', 'password']}, - {'review': 'round4-final-node-genkit.txt', - 'names': ['apiKey', 'X-Amz-Signature']}, - {'review': 'round4-final-node-mastra.txt', 'names': ['api_key']}, - {'review': 'round4-final-py-agentscope.txt', 'names': ['Authorization']}, - {'review': 'round4-final-python-r4.txt', 'names': ['Authorization']}, - {'review': 'round4-final-launcher.txt', - 'names': ['api_key', 'secret_key', 'X-Amz-Signature']}, - {'review': 'round5-final-go-s5.txt', - 'names': ['client_secret', 'Proxy-Authorization']}, - {'review': 'round5-final-java-s5.txt', - 'names': ['X-Auth-Token', 'passwd', 'token']}, - {'review': 'round5-final-genkit-s5.txt', - 'names': ['x-vault-token', 'database_password']}, - {'review': 'round5-final-python-s5.txt', - 'names': ['X-Session-Id', 'auth_token', 'x-vault-token']}, - {'review': 'round5-final-csharp-s5.txt', - 'names': ['key', 'passwd', 'Set-Cookie', 'private-token', 'x-vault-token']}, - {'review': 'round5-final-ruby-s5.txt', - 'names': ['x-access-token', + {'names': ['authorization_token', 'client_secret', 'password']}, + {'names': ['apiKey', 'X-Amz-Signature']}, + {'names': ['api_key']}, + {'names': ['Authorization']}, + {'names': ['Authorization']}, + {'names': ['api_key', 'secret_key', 'X-Amz-Signature']}, + {'names': ['client_secret', 'Proxy-Authorization']}, + {'names': ['X-Auth-Token', 'passwd', 'token']}, + {'names': ['x-vault-token', 'database_password']}, + {'names': ['X-Session-Id', 'auth_token', 'x-vault-token']}, + {'names': ['key', 'passwd', 'Set-Cookie', 'private-token', 'x-vault-token']}, + {'names': ['x-access-token', 'private-token', 'x-vault-token', 'client_secret', @@ -951,7 +941,7 @@ def query_object_sites(prefix, pairs): add(f"contextual-descendant-{item['id']}-{i}-{site}", site, secret, redacted, path + ".api_key") logprobs = {"choices": [{"logprobs": {"content": [{"token": "Hello", "logprob": -0.2, "top_logprobs": [{"token": "world", "logprob": -0.3}]}]}}]} - # RL2298g: keep the shared path no weaker than the manual Mastra oracle. + # Keep the shared path no weaker than the manual Mastra oracle. # Retain logprob numbers, but token-named payloads no longer get an exemption. masked_logprobs = {"choices": [{"logprobs": {"content": [{"token": redacted, "logprob": -0.2, "top_logprobs": [{"token": redacted, "logprob": -0.3}]}]}}]} diff --git a/spec/auto-instrumentation/privacy.json b/spec/auto-instrumentation/privacy.json index 915a5ffb2..c72a6e039 100644 --- a/spec/auto-instrumentation/privacy.json +++ b/spec/auto-instrumentation/privacy.json @@ -3,14 +3,14 @@ "scalar_metrics": { "version": 6, "canonical_decimal": { - "ruling": "LANE-CALL-NIKM4-5A-I1-DIGIT-STRING-COUNTS-r2 with I1-R10B A-DIGIT-CONFINED", + "ruling": "A declared canonical-decimal counter keeps a full decimal count string with a safe-integer value, unless the string has base64 shape.", "regex": "^(0|[1-9][0-9]{0,15})$", "max_chars": 16, "base64_min_chars": 4, "keys": ["gen_ai.audio.bytes"], "scope": "Only declared canonical-decimal counters consult this rule. gen_ai.audio.bytes keeps full canonical decimal strings with a safe-integer numeric value unless they have base64 shape at or above base64_min_chars. elevenlabs.audio.bytes never grants a string role. The four-character shape threshold is not a special case for one count. Preserve accepted string types; no signs, leading zeros, fractions, exponents, whitespace or final newline. Other G4 core/detail keys retain their original scalar roles, including arbitrary strings and literal undefined. This rule does not change Q8b NON_CONTENT types." }, - "ruling": "TRACEAI-I1-G3-G4-POLICY-SCOPE-RULING-r1-FISEC G4", + "ruling": "Only exact declared usage and metric keys get a scalar metric role, and media, credential and secret signals always take precedence over it.", "scope": "Closed exact complete keys in the declared usage/metrics containers only. Case, punctuation, prefixes, suffixes and array indices are not aliases. A nested object path must equal the complete key. gen_ai.audio and elevenlabs.audio are metric containers only for their listed bytes counters, not for arbitrary audio members. Their nonnegative_safe_integer value_type grants a role to finite nonnegative safe-integer numbers; only gen_ai.audio.bytes additionally accepts strings under canonical_decimal. gen_ai.usage.cache_read_tokens.audio also accepts only nonnegative safe-integer numbers, never strings. All other inputs on these typed counters retain the role-free media policy. Other declared metrics keep their original number/boolean/string roles without decimal validation.", "precedence": "Scalar role only removes structural media classification caused by the metric spelling. Explicit media/type hints on any ancestor, inherited media/audio, established media payload ancestry, credential ancestry and known numeric/string secrets take precedence. On the two typed byte counters only, base64-shaped strings at or above canonical_decimal.base64_min_chars cannot obtain a role, even when numerically safe. Magic bytes, data URIs and other independent value checks still apply. A counter leaf under established media payload ancestry cannot use the usage metadata boundary to escape omission. Private payload-role ancestry survives parsed, stringified and diagnostic JSON handoffs; resetting a JSON root never grants a metric role. Metric-looking descendants reached through this retained payload origin remain payload, including numeric/bool scalars and numeric/bool arrays; ordinary metadata text boundaries are unchanged.", "arrays": "Arrays never receive the scalar metric role. Nonempty numeric/bool media payload arrays are omitted; existing string/object array walking and empty-array behavior remain unchanged.", @@ -391,7 +391,6 @@ ], "missed_name_sources": [ { - "review": "round4-final-node-r4.txt", "names": [ "x-goog-api-key", "anthropic-api-key", @@ -399,7 +398,6 @@ ] }, { - "review": "round4-final-csharp-r4.txt", "names": [ "authorization_token", "client_secret", @@ -407,32 +405,27 @@ ] }, { - "review": "round4-final-node-genkit.txt", "names": [ "apiKey", "X-Amz-Signature" ] }, { - "review": "round4-final-node-mastra.txt", "names": [ "api_key" ] }, { - "review": "round4-final-py-agentscope.txt", "names": [ "Authorization" ] }, { - "review": "round4-final-python-r4.txt", "names": [ "Authorization" ] }, { - "review": "round4-final-launcher.txt", "names": [ "api_key", "secret_key", @@ -440,14 +433,12 @@ ] }, { - "review": "round5-final-go-s5.txt", "names": [ "client_secret", "Proxy-Authorization" ] }, { - "review": "round5-final-java-s5.txt", "names": [ "X-Auth-Token", "passwd", @@ -455,14 +446,12 @@ ] }, { - "review": "round5-final-genkit-s5.txt", "names": [ "x-vault-token", "database_password" ] }, { - "review": "round5-final-python-s5.txt", "names": [ "X-Session-Id", "auth_token", @@ -470,7 +459,6 @@ ] }, { - "review": "round5-final-csharp-s5.txt", "names": [ "key", "passwd", @@ -480,7 +468,6 @@ ] }, { - "review": "round5-final-ruby-s5.txt", "names": [ "x-access-token", "private-token", diff --git a/typescript/packages/fi-core/README.md b/typescript/packages/fi-core/README.md index ad0f24b18..17215bc35 100644 --- a/typescript/packages/fi-core/README.md +++ b/typescript/packages/fi-core/README.md @@ -659,7 +659,7 @@ API while making zero-code ownership explicit. ### Media policy and image cap for this release For this release, the ratified -`LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1` decision makes I1 media +media policy makes I1 media omission dominant at every cap in the FI retained/export view. Recognized base64/media and data URLs are omitted, including images at or below a positive cap; recognized base64 image payloads in payload fields or `data:` URLs use diff --git a/typescript/packages/fi-core/src/__tests__/base64ImageCap.test.ts b/typescript/packages/fi-core/src/__tests__/base64ImageCap.test.ts index 404dc9f30..5d204d735 100644 --- a/typescript/packages/fi-core/src/__tests__/base64ImageCap.test.ts +++ b/typescript/packages/fi-core/src/__tests__/base64ImageCap.test.ts @@ -181,7 +181,7 @@ describe("base64 image cap", () => { it("exactly the limit: I1 omits image payloads and retains non-image attributes", () => { const attributes = shape(MAX); // PENDING I1xF2-PRECEDENCE T12-T22: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. Literal fixture + // Literal fixture // replacements retain every other byte, including nested JSON and metadata. const expected = Object.fromEntries(Object.entries(attributes).map(([key, value]) => { if (typeof value !== "string") return [key, value]; @@ -323,7 +323,6 @@ describe("base64 image cap", () => { expect(exportWith({ [key]: dataUrl(MAX + 1) }, {}).attributes[key]).toBe(REDACTED_VALUE); exporter.reset(); // PENDING I1xF2-PRECEDENCE T26: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. const span = exportWith({ [key]: dataUrl(MAX) }, {}); expect(span.attributes[key]).toBe(""); expectNoImage(span); @@ -334,7 +333,6 @@ describe("base64 image cap", () => { const key = "custom.image"; const value = dataUrl(MAX + 1); // PENDING I1xF2-PRECEDENCE T27: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. const span = exportWith({ [key]: value }, { base64ImageMaxLength: MAX * 2 }); expect(span.attributes[key]).toBe(""); expectNoImage(span); diff --git a/typescript/packages/fi-core/src/__tests__/embedding-model-metadata.test.ts b/typescript/packages/fi-core/src/__tests__/embedding-model-metadata.test.ts index 29325a2ce..9cd29c98e 100644 --- a/typescript/packages/fi-core/src/__tests__/embedding-model-metadata.test.ts +++ b/typescript/packages/fi-core/src/__tests__/embedding-model-metadata.test.ts @@ -9,7 +9,7 @@ beforeEach(() => { for (const key of Object.keys(process.env)) if (/^(FI_|OTEL_) afterEach(() => { process.env = { ...saved }; }); // Projection-only carry from r2. Retention priority does not exempt a value from privacy. -// LANE-CALL-NIKM4-5A-EMBEDDING-MODEL-NAME-CUT-r1 drops the vector-hiding exemption cases. +// Hiding embedding vectors also hides the model name, so the vector-hiding exemption cases are dropped. test("projection reserves exact legacy model identity before embedding payload groups", () => { const attrs: Attributes = { "fi.span.kind": "EMBEDDING", "gen_ai.operation.name": "embeddings", diff --git a/typescript/packages/fi-core/src/__tests__/g1-hidden-marker-precedence.test.ts b/typescript/packages/fi-core/src/__tests__/g1-hidden-marker-precedence.test.ts index 3a31637ba..02b8d15c2 100644 --- a/typescript/packages/fi-core/src/__tests__/g1-hidden-marker-precedence.test.ts +++ b/typescript/packages/fi-core/src/__tests__/g1-hidden-marker-precedence.test.ts @@ -70,7 +70,7 @@ describe.each(flags)("%s marker precedence", flag => { for (const key of aliases) expect(JSON.parse(clean.attributes[key] as string)).toEqual(input()); expect(clean.status.message).toBe(providerError); // PENDING I1xF2-PRECEDENCE T71-T74: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. Default zero uses the + // Default zero uses the // F2 marker; the explicit positive-cap twin retains the original I1 marker. const mediaInput = span(input(png)), before = JSON.stringify(mediaInput); for (const [filter, expected] of [ diff --git a/typescript/packages/fi-core/src/__tests__/i1-composed-privacy.test.ts b/typescript/packages/fi-core/src/__tests__/i1-composed-privacy.test.ts index 61e207dc5..218707b28 100644 --- a/typescript/packages/fi-core/src/__tests__/i1-composed-privacy.test.ts +++ b/typescript/packages/fi-core/src/__tests__/i1-composed-privacy.test.ts @@ -232,7 +232,7 @@ test("I1-O1 cap mechanism has exact boundary while composed A remains stronger", expect(clean.name).toBe("retained span"); expect(clean.attributes.safe).toBe("ordinary words"); // PENDING I1xF2-PRECEDENCE T10: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1; retain the original omission/absence checks. + // Retain the original omission/absence checks. expect(clean.attributes.arbitrary).toBe(""); expect(clean.attributes.arbitrary).toContain(", at least 16 characters) at a value limit of 16 is class (b) // host-loss evidence, so the lineage is withheld by design (over-redaction, disclosed). const savedEnv = { ...process.env }, registryKey = Symbol.for("traceai.secrets"); diff --git a/typescript/packages/fi-core/src/__tests__/imageCapF2DefaultZero.test.ts b/typescript/packages/fi-core/src/__tests__/imageCapF2DefaultZero.test.ts index d7241619d..8c6b90294 100644 --- a/typescript/packages/fi-core/src/__tests__/imageCapF2DefaultZero.test.ts +++ b/typescript/packages/fi-core/src/__tests__/imageCapF2DefaultZero.test.ts @@ -8,7 +8,7 @@ import { mask, maskAttributes, redactValue } from "../trace/trace-config/masking import { FITracer } from "../trace/trace-config/FITracer"; import { TraceConfigOptions } from "../trace/trace-config/types"; -// F2 r4c6 rebase under LANE-CALL-NIKM4-5A-F2-CAP0-OVERREDACTION-r2. Runtime NOT_RUN. +// F2: the default image cap is 0. // Cap-0 trigger: in one Q1 scope view, a case-insensitive "data:", then "image/", // then ",". The protected split-token pair stays byte-identical. // TS-F2-R6 (PENDING PTC-TS-F2-R6-A1): each view is searched with the ASCII members diff --git a/typescript/packages/fi-core/src/__tests__/imageCapFailClosedWitnesses.test.ts b/typescript/packages/fi-core/src/__tests__/imageCapFailClosedWitnesses.test.ts index 1fd5b6b75..1d88f4afa 100644 --- a/typescript/packages/fi-core/src/__tests__/imageCapFailClosedWitnesses.test.ts +++ b/typescript/packages/fi-core/src/__tests__/imageCapFailClosedWitnesses.test.ts @@ -1,4 +1,4 @@ -// Fail-closed r4 witness controls (fi-security 628059fc; RL 2310ah). Lead-authored from the fail-closed r3 lens witnesses; RED on the r3 base. +// Fail-closed r4 witness controls, derived from the fail-closed r3 witnesses; they fail on the r3 code. import { capBase64Images } from "../trace/trace-config/imageCap"; const BS = String.fromCharCode(92); diff --git a/typescript/packages/fi-core/src/__tests__/imageCapRound4Classes.test.ts b/typescript/packages/fi-core/src/__tests__/imageCapRound4Classes.test.ts index 16754381a..fddf544a3 100644 --- a/typescript/packages/fi-core/src/__tests__/imageCapRound4Classes.test.ts +++ b/typescript/packages/fi-core/src/__tests__/imageCapRound4Classes.test.ts @@ -160,7 +160,6 @@ it("exports MIME-pair and member-name repairs through real SDK attributes", () = expect(results[0].attributes.mime).toBe(MARK); expect(results[0].attributes.keyDocument).toBe('{"__REDACTED__":"keep"}'); // PENDING I1xF2-PRECEDENCE T58: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. expect(results[0].attributes.exact).toBe(""); const exported = JSON.stringify({ attributes: results[0].attributes, events: results[0].events, status: results[0].status }); expect(exported).not.toContain(EXACT.slice(HEADER.length)); diff --git a/typescript/packages/fi-core/src/__tests__/piiEmailResourceBound.test.ts b/typescript/packages/fi-core/src/__tests__/piiEmailResourceBound.test.ts index 27d916144..0294beb52 100644 --- a/typescript/packages/fi-core/src/__tests__/piiEmailResourceBound.test.ts +++ b/typescript/packages/fi-core/src/__tests__/piiEmailResourceBound.test.ts @@ -200,7 +200,7 @@ describe("email matching has bounded candidate work", () => { }); it("retains email-first ordering and all other PII replacements", () => { - const input = "123-45-6789@x.test | 123-45-6789 | 4111 1111 1111 1111 | 192.168.1.1 | 555-123-4567 | " + ["sk", "live", "A".repeat(24)].join("_"); // synthetic test value (fi-security RLIT-TRACEAI-R15-3888B65C-GH013-STRIPE-FIXTURES-r1-FISEC) + const input = "123-45-6789@x.test | 123-45-6789 | 4111 1111 1111 1111 | 192.168.1.1 | 555-123-4567 | " + ["sk", "live", "A".repeat(24)].join("_"); // synthetic test value expect(measuredScan(input).output).toBe( " | | | | | ", ); @@ -237,7 +237,6 @@ describe("email resource controls reach actual SDK exports", () => { [malformed, malformed], [input, piiRedaction ? redacted : input], // PENDING I1xF2-PRECEDENCE T36-T37: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. [exactImage, ""], [exactImage + "A", "__REDACTED__"], ]; diff --git a/typescript/packages/fi-core/src/__tests__/piiQuickCheckSuperset.test.ts b/typescript/packages/fi-core/src/__tests__/piiQuickCheckSuperset.test.ts index 31fccc2f5..f75b13600 100644 --- a/typescript/packages/fi-core/src/__tests__/piiQuickCheckSuperset.test.ts +++ b/typescript/packages/fi-core/src/__tests__/piiQuickCheckSuperset.test.ts @@ -12,7 +12,7 @@ const CLASSES: Array<[string, string]> = [ ["123-45-6789", ""], ["4111 1111 1111 1111", ""], ["192.168.1.1", ""], - [["sk", "test", "ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0, 24)].join("_"), ""], // synthetic test value (fi-security RLIT-TRACEAI-R15-3888B65C-GH013-STRIPE-FIXTURES-r1-FISEC) + [["sk", "test", "ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0, 24)].join("_"), ""], // synthetic test value ["pk-live-ABCDEFGHIJKLMNOPQRSTUVWX", ""], ["555-123-4567", ""], ]; @@ -33,7 +33,7 @@ describe("PII admission is a conservative superset", () => { }); it("keeps existing pattern precedence, not just phone admission", () => { - const raw = "123-45-6789@example.test | 123-45-6789 | 4111 1111 1111 1111 | 192.168.1.1 | " + ["sk", "test", "ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0, 24)].join("_") + " | 5551234567"; // synthetic test value (fi-security RLIT-TRACEAI-R15-3888B65C-GH013-STRIPE-FIXTURES-r1-FISEC) + const raw = "123-45-6789@example.test | 123-45-6789 | 4111 1111 1111 1111 | 192.168.1.1 | " + ["sk", "test", "ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0, 24)].join("_") + " | 5551234567"; // synthetic test value expect(redactPiiInString(raw)).toBe(" | | | | | "); }); diff --git a/typescript/packages/fi-core/src/__tests__/privacy.test.ts b/typescript/packages/fi-core/src/__tests__/privacy.test.ts index 3bb5fc239..518cf1cde 100644 --- a/typescript/packages/fi-core/src/__tests__/privacy.test.ts +++ b/typescript/packages/fi-core/src/__tests__/privacy.test.ts @@ -19,7 +19,7 @@ test("S1 keeps JSON primitive scalar recognition through SDK serialization", () expect(scrubAttribute("12345678", ["12345678"])).toBe(""); }); test("S6 full path exclusions never exempt independent credential ancestry", () => { - // A flattened name has no provider provenance (RL 2299t). Only the explicit + // A flattened name has no provider provenance. Only the explicit // provider-root walker may exempt token names; independent ancestry stays private. expect(isCredentialName("choices.0.logprobs.content.0.token")).toBe(true); expect(isCredentialName("secret.choices.0.logprobs.content.0.token")).toBe(true); diff --git a/typescript/packages/fi-core/src/__tests__/privacyRuntimePerfEquivalence.test.ts b/typescript/packages/fi-core/src/__tests__/privacyRuntimePerfEquivalence.test.ts index a411072a2..991604dc1 100644 --- a/typescript/packages/fi-core/src/__tests__/privacyRuntimePerfEquivalence.test.ts +++ b/typescript/packages/fi-core/src/__tests__/privacyRuntimePerfEquivalence.test.ts @@ -251,7 +251,7 @@ const PARENT_RUNTIME_SHA256 = "d4601e3aff870d917336c78510ffa0544eb62204383d8e429 const BASE_RUNTIME_SHA256 = "411d30cc45c3cdc801a6a9e172ddd3cf41a6ffdc4b193861cec6962a067b95a9"; // fi-core 1.2.2: rebase both runtime oracles onto scalar catalog v6. The // algorithm is unchanged; audioCacheCount.test.ts verifies the new typed key. -const BASE_CATALOG_SHA256 = "9da3fef3a84741f8cbe345a44f6a2f8c6aa7737fdf3c1a91d590f271eadb138f"; +const BASE_CATALOG_SHA256 = "2e278f5ea945d7049cbbfff0ba8c38d98cdc2f9959ed78a29fd0ba59c9ff2539"; const source = readFileSync(join(__dirname, "..", "privacy-runtime.ts"), "utf8"); const currentCatalogSource = readFileSync(join(__dirname, "..", "privacy.json"), "utf8"); // Strip each additive declaration section explicitly; neither belongs to 1.2.0. diff --git a/typescript/packages/fi-core/src/__tests__/round6-passA.test.ts b/typescript/packages/fi-core/src/__tests__/round6-passA.test.ts index 5a37f0b29..f305a2394 100644 --- a/typescript/packages/fi-core/src/__tests__/round6-passA.test.ts +++ b/typescript/packages/fi-core/src/__tests__/round6-passA.test.ts @@ -144,7 +144,7 @@ test("R-C07", async () => { register({ endpoint: "http://127.0.0.1:1", headers: {}, projectName: "routing-project", setGlobalTracerProvider: false, transport: Transport.GRPC, batch: true }), new FITracerProvider({ endpoint: "http://127.0.0.1:1", headers: {}, batch: true })]) { const processors = (provider as any)._activeSpanProcessor._spanProcessors; - // RL2299h: explicit batch routes remain bounded through the dev registry. + // Explicit batch routes remain bounded through the dev registry. expect(processors[0]).toBeInstanceOf(require("@opentelemetry/sdk-trace-base").BatchSpanProcessor); expect(Number.isFinite(processors[0]._maxQueueSize) && processors[0]._maxQueueSize > 0).toBe(true); expect(Number.isFinite(processors[0]._maxExportBatchSize) && processors[0]._maxExportBatchSize > 0).toBe(true); diff --git a/typescript/packages/fi-core/src/__tests__/round6.test.ts b/typescript/packages/fi-core/src/__tests__/round6.test.ts index f53ba3385..df2ea6c74 100644 --- a/typescript/packages/fi-core/src/__tests__/round6.test.ts +++ b/typescript/packages/fi-core/src/__tests__/round6.test.ts @@ -25,7 +25,7 @@ function fixture(): any { status: { code: 2, message: "registered-manual-private" }, events: [{ name: "registered-manual-private", time: [1, 2], attributes: { echoed: "registered-manual-private" } }], links: [], resource: resourceFromAttributes({ safe: "application" }), instrumentationScope: { name: "application" } }; } -test.each(["factory-http", "factory-grpc", "legacy-http", "legacy-grpc", "register-default", "register-batch", "direct-provider"])("A2 every owned %s route applies S1 on a detached span; RL2299h preserves manual policy", async route => { +test.each(["factory-http", "factory-grpc", "legacy-http", "legacy-grpc", "register-default", "register-batch", "direct-provider"])("A2 every owned %s route applies S1 on a detached span; manual policy is preserved", async route => { registerSecret("registered-manual-private"); const fetch = jest.spyOn(globalThis, "fetch").mockResolvedValue(new Response("{}")); const original = fixture(), before = JSON.stringify(original); diff --git a/typescript/packages/fi-core/src/__tests__/sdkCapPiiClassFix.test.ts b/typescript/packages/fi-core/src/__tests__/sdkCapPiiClassFix.test.ts index 1332ce746..71642d1da 100644 --- a/typescript/packages/fi-core/src/__tests__/sdkCapPiiClassFix.test.ts +++ b/typescript/packages/fi-core/src/__tests__/sdkCapPiiClassFix.test.ts @@ -90,7 +90,7 @@ describe("class-fix", () => { }); it.each(URL_CASES)("boundary exact control %s", (_label, url) => { // PENDING I1xF2-PRECEDENCE T39-T44: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. Counts include the + // Counts include the // original LF/CRLF payload units, matching I1 rather than a normalized decoder. const omissions: Record = { "long-header": "", @@ -176,7 +176,6 @@ describe("class-fix", () => { const payload = "\\u0051\\u0055\\u004a\\u0044".repeat(repeats); const raw = '{"media_type":"image/png","data":"' + payload + '"}'; // PENDING I1xF2-PRECEDENCE T53: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. expect(capBase64Images(raw, MAX)).toBe(repeats * 4 > MAX ? raw.replace(payload, MARK) : raw); const result = valueExport(raw); expect(result).toBe(raw.replace(payload, repeats * 4 > MAX ? MARK : "")); @@ -186,7 +185,6 @@ describe("class-fix", () => { it("exact image omission preserves lossless non-image JSON tokens", () => { const raw = '{"id":9007199254740993,"n":1e400,"url":' + JSON.stringify(at(MAX)) + '}'; // PENDING I1xF2-PRECEDENCE T54: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. expect(capBase64Images(raw, MAX)).toBe(raw); const result = valueExport(raw); expect(result).toBe(raw.replace(at(MAX), "")); @@ -195,7 +193,7 @@ describe("class-fix", () => { it.each([0, 1, 4])("schema metadata cap %i", (maximum) => { const raw = '{"type":"image","modality":"image","id":"QUJD","name":"image","schema":"base64","other":"QUJD","source":{"type":"base64","media_type":"image/png","data":"QUJD"}}'; // PENDING I1xF2-PRECEDENCE T56: TS I1 media omission dominates positive caps. - // LANE-CALL-NIKM4-5A-TS-IMAGE-EXPORT-I1-DOMINATES-r1. Cap-zero T55 keeps its r1 marker fix. + // Cap-zero T55 keeps its r1 marker fix. const expected = maximum === 0 ? raw.replace('"data":"QUJD"', '"data":"[image-redacted]"') : maximum < 4 ? raw.replace('"data":"QUJD"', '"data":"' + MARK + '"') : raw.replace('"data":"QUJD"', '"data":""'); const result = valueExport(raw, { base64ImageMaxLength: maximum }); const parsed = JSON.parse(result as string); diff --git a/typescript/packages/fi-core/src/__tests__/typedImagePositiveCap.test.ts b/typescript/packages/fi-core/src/__tests__/typedImagePositiveCap.test.ts index 4979ad19b..e5b7414ac 100644 --- a/typescript/packages/fi-core/src/__tests__/typedImagePositiveCap.test.ts +++ b/typescript/packages/fi-core/src/__tests__/typedImagePositiveCap.test.ts @@ -71,7 +71,7 @@ const DECLARATIONS: Array<[string, Record]> = [ ["mimeType image", { mimeType: "image/bmp" }], ["mediaType image", { mediaType: "image/bmp" }], ["content_type image", { content_type: "image/bmp" }], - // Lead edit (RL 2310en AMENDED-3 coverage): other image media types on every route. + // Other image media types on every route. ["mime_type image/png", { mime_type: "image/png" }], ["mime_type image/jpeg", { mime_type: "image/jpeg" }], ["mime_type image/gif", { mime_type: "image/gif" }], diff --git a/typescript/packages/fi-core/src/privacy.json b/typescript/packages/fi-core/src/privacy.json index 915a5ffb2..c72a6e039 100644 --- a/typescript/packages/fi-core/src/privacy.json +++ b/typescript/packages/fi-core/src/privacy.json @@ -3,14 +3,14 @@ "scalar_metrics": { "version": 6, "canonical_decimal": { - "ruling": "LANE-CALL-NIKM4-5A-I1-DIGIT-STRING-COUNTS-r2 with I1-R10B A-DIGIT-CONFINED", + "ruling": "A declared canonical-decimal counter keeps a full decimal count string with a safe-integer value, unless the string has base64 shape.", "regex": "^(0|[1-9][0-9]{0,15})$", "max_chars": 16, "base64_min_chars": 4, "keys": ["gen_ai.audio.bytes"], "scope": "Only declared canonical-decimal counters consult this rule. gen_ai.audio.bytes keeps full canonical decimal strings with a safe-integer numeric value unless they have base64 shape at or above base64_min_chars. elevenlabs.audio.bytes never grants a string role. The four-character shape threshold is not a special case for one count. Preserve accepted string types; no signs, leading zeros, fractions, exponents, whitespace or final newline. Other G4 core/detail keys retain their original scalar roles, including arbitrary strings and literal undefined. This rule does not change Q8b NON_CONTENT types." }, - "ruling": "TRACEAI-I1-G3-G4-POLICY-SCOPE-RULING-r1-FISEC G4", + "ruling": "Only exact declared usage and metric keys get a scalar metric role, and media, credential and secret signals always take precedence over it.", "scope": "Closed exact complete keys in the declared usage/metrics containers only. Case, punctuation, prefixes, suffixes and array indices are not aliases. A nested object path must equal the complete key. gen_ai.audio and elevenlabs.audio are metric containers only for their listed bytes counters, not for arbitrary audio members. Their nonnegative_safe_integer value_type grants a role to finite nonnegative safe-integer numbers; only gen_ai.audio.bytes additionally accepts strings under canonical_decimal. gen_ai.usage.cache_read_tokens.audio also accepts only nonnegative safe-integer numbers, never strings. All other inputs on these typed counters retain the role-free media policy. Other declared metrics keep their original number/boolean/string roles without decimal validation.", "precedence": "Scalar role only removes structural media classification caused by the metric spelling. Explicit media/type hints on any ancestor, inherited media/audio, established media payload ancestry, credential ancestry and known numeric/string secrets take precedence. On the two typed byte counters only, base64-shaped strings at or above canonical_decimal.base64_min_chars cannot obtain a role, even when numerically safe. Magic bytes, data URIs and other independent value checks still apply. A counter leaf under established media payload ancestry cannot use the usage metadata boundary to escape omission. Private payload-role ancestry survives parsed, stringified and diagnostic JSON handoffs; resetting a JSON root never grants a metric role. Metric-looking descendants reached through this retained payload origin remain payload, including numeric/bool scalars and numeric/bool arrays; ordinary metadata text boundaries are unchanged.", "arrays": "Arrays never receive the scalar metric role. Nonempty numeric/bool media payload arrays are omitted; existing string/object array walking and empty-array behavior remain unchanged.", @@ -391,7 +391,6 @@ ], "missed_name_sources": [ { - "review": "round4-final-node-r4.txt", "names": [ "x-goog-api-key", "anthropic-api-key", @@ -399,7 +398,6 @@ ] }, { - "review": "round4-final-csharp-r4.txt", "names": [ "authorization_token", "client_secret", @@ -407,32 +405,27 @@ ] }, { - "review": "round4-final-node-genkit.txt", "names": [ "apiKey", "X-Amz-Signature" ] }, { - "review": "round4-final-node-mastra.txt", "names": [ "api_key" ] }, { - "review": "round4-final-py-agentscope.txt", "names": [ "Authorization" ] }, { - "review": "round4-final-python-r4.txt", "names": [ "Authorization" ] }, { - "review": "round4-final-launcher.txt", "names": [ "api_key", "secret_key", @@ -440,14 +433,12 @@ ] }, { - "review": "round5-final-go-s5.txt", "names": [ "client_secret", "Proxy-Authorization" ] }, { - "review": "round5-final-java-s5.txt", "names": [ "X-Auth-Token", "passwd", @@ -455,14 +446,12 @@ ] }, { - "review": "round5-final-genkit-s5.txt", "names": [ "x-vault-token", "database_password" ] }, { - "review": "round5-final-python-s5.txt", "names": [ "X-Session-Id", "auth_token", @@ -470,7 +459,6 @@ ] }, { - "review": "round5-final-csharp-s5.txt", "names": [ "key", "passwd", @@ -480,7 +468,6 @@ ] }, { - "review": "round5-final-ruby-s5.txt", "names": [ "x-access-token", "private-token", diff --git a/typescript/packages/fi-core/src/trace/trace-config/imageCap.ts b/typescript/packages/fi-core/src/trace/trace-config/imageCap.ts index 68103b9bc..c12798467 100644 --- a/typescript/packages/fi-core/src/trace/trace-config/imageCap.ts +++ b/typescript/packages/fi-core/src/trace/trace-config/imageCap.ts @@ -901,7 +901,7 @@ function transportedMimeMatch(raw: string, view: View, runs: Uint32Array, chains * non-ASCII isspace() members are outside this set (disclosed residual). */ const ZERO_CAP_SPACE = /[\t\n\v\f\r\x1c-\x20]/g; -/** F2 zero-cap trigger (LANE-CALL-NIKM4-5A-F2-CAP0-OVERREDACTION-r2): within +/** F2 zero-cap trigger: within * one view of one Q1 scope, a case-insensitive "data:" followed later by * "image/" followed later by ",". RFC 2397 puts the comma before any payload, * so a scope without one carries none. No MIME grammar, subtype, flag, window diff --git a/typescript/packages/traceai_auto/src/wire/privacy.json b/typescript/packages/traceai_auto/src/wire/privacy.json index 915a5ffb2..c72a6e039 100644 --- a/typescript/packages/traceai_auto/src/wire/privacy.json +++ b/typescript/packages/traceai_auto/src/wire/privacy.json @@ -3,14 +3,14 @@ "scalar_metrics": { "version": 6, "canonical_decimal": { - "ruling": "LANE-CALL-NIKM4-5A-I1-DIGIT-STRING-COUNTS-r2 with I1-R10B A-DIGIT-CONFINED", + "ruling": "A declared canonical-decimal counter keeps a full decimal count string with a safe-integer value, unless the string has base64 shape.", "regex": "^(0|[1-9][0-9]{0,15})$", "max_chars": 16, "base64_min_chars": 4, "keys": ["gen_ai.audio.bytes"], "scope": "Only declared canonical-decimal counters consult this rule. gen_ai.audio.bytes keeps full canonical decimal strings with a safe-integer numeric value unless they have base64 shape at or above base64_min_chars. elevenlabs.audio.bytes never grants a string role. The four-character shape threshold is not a special case for one count. Preserve accepted string types; no signs, leading zeros, fractions, exponents, whitespace or final newline. Other G4 core/detail keys retain their original scalar roles, including arbitrary strings and literal undefined. This rule does not change Q8b NON_CONTENT types." }, - "ruling": "TRACEAI-I1-G3-G4-POLICY-SCOPE-RULING-r1-FISEC G4", + "ruling": "Only exact declared usage and metric keys get a scalar metric role, and media, credential and secret signals always take precedence over it.", "scope": "Closed exact complete keys in the declared usage/metrics containers only. Case, punctuation, prefixes, suffixes and array indices are not aliases. A nested object path must equal the complete key. gen_ai.audio and elevenlabs.audio are metric containers only for their listed bytes counters, not for arbitrary audio members. Their nonnegative_safe_integer value_type grants a role to finite nonnegative safe-integer numbers; only gen_ai.audio.bytes additionally accepts strings under canonical_decimal. gen_ai.usage.cache_read_tokens.audio also accepts only nonnegative safe-integer numbers, never strings. All other inputs on these typed counters retain the role-free media policy. Other declared metrics keep their original number/boolean/string roles without decimal validation.", "precedence": "Scalar role only removes structural media classification caused by the metric spelling. Explicit media/type hints on any ancestor, inherited media/audio, established media payload ancestry, credential ancestry and known numeric/string secrets take precedence. On the two typed byte counters only, base64-shaped strings at or above canonical_decimal.base64_min_chars cannot obtain a role, even when numerically safe. Magic bytes, data URIs and other independent value checks still apply. A counter leaf under established media payload ancestry cannot use the usage metadata boundary to escape omission. Private payload-role ancestry survives parsed, stringified and diagnostic JSON handoffs; resetting a JSON root never grants a metric role. Metric-looking descendants reached through this retained payload origin remain payload, including numeric/bool scalars and numeric/bool arrays; ordinary metadata text boundaries are unchanged.", "arrays": "Arrays never receive the scalar metric role. Nonempty numeric/bool media payload arrays are omitted; existing string/object array walking and empty-array behavior remain unchanged.", @@ -391,7 +391,6 @@ ], "missed_name_sources": [ { - "review": "round4-final-node-r4.txt", "names": [ "x-goog-api-key", "anthropic-api-key", @@ -399,7 +398,6 @@ ] }, { - "review": "round4-final-csharp-r4.txt", "names": [ "authorization_token", "client_secret", @@ -407,32 +405,27 @@ ] }, { - "review": "round4-final-node-genkit.txt", "names": [ "apiKey", "X-Amz-Signature" ] }, { - "review": "round4-final-node-mastra.txt", "names": [ "api_key" ] }, { - "review": "round4-final-py-agentscope.txt", "names": [ "Authorization" ] }, { - "review": "round4-final-python-r4.txt", "names": [ "Authorization" ] }, { - "review": "round4-final-launcher.txt", "names": [ "api_key", "secret_key", @@ -440,14 +433,12 @@ ] }, { - "review": "round5-final-go-s5.txt", "names": [ "client_secret", "Proxy-Authorization" ] }, { - "review": "round5-final-java-s5.txt", "names": [ "X-Auth-Token", "passwd", @@ -455,14 +446,12 @@ ] }, { - "review": "round5-final-genkit-s5.txt", "names": [ "x-vault-token", "database_password" ] }, { - "review": "round5-final-python-s5.txt", "names": [ "X-Session-Id", "auth_token", @@ -470,7 +459,6 @@ ] }, { - "review": "round5-final-csharp-s5.txt", "names": [ "key", "passwd", @@ -480,7 +468,6 @@ ] }, { - "review": "round5-final-ruby-s5.txt", "names": [ "x-access-token", "private-token", diff --git a/typescript/packages/traceai_auto/test/privacy-catalog.test.ts b/typescript/packages/traceai_auto/test/privacy-catalog.test.ts index cc1738a6c..8f0fd852b 100644 --- a/typescript/packages/traceai_auto/test/privacy-catalog.test.ts +++ b/typescript/packages/traceai_auto/test/privacy-catalog.test.ts @@ -34,7 +34,7 @@ test("S6 one credential predicate drives headers, query, parsed body and export expect(privacyFilter().attributes({ [`metadata.${name}[0]`]: secret })[`metadata.${name}[0]`]).toBe(""); } const response = { usage: { input_tokens_details: { cache_read: "123456789" } }, choices: [{ logprobs: { content: [{ token: "ordinary-word" }] } }] }; - // RL 2299t restores ordinary tokens only at an explicitly parsed provider root. + // Ordinary tokens are restored only at an explicitly parsed provider root. expect(discoverProviderResponseSecrets(response)).toEqual([]); // fi-security (7): identical untrusted attribute/user JSON retains the name rule. expect(discoverSecrets([response])).toEqual(["ordinary-word"]); diff --git a/typescript/packages/traceai_cursor_plugin/test/cli-pack.cjs b/typescript/packages/traceai_cursor_plugin/test/cli-pack.cjs index e25f03c74..267e23dfb 100644 --- a/typescript/packages/traceai_cursor_plugin/test/cli-pack.cjs +++ b/typescript/packages/traceai_cursor_plugin/test/cli-pack.cjs @@ -29,6 +29,6 @@ const disabled = spawnSync(cli, ['disable', 'cursor-cli', '--json'], { env, enco assert.equal(disabled.status, 0, disabled.stderr); for (const filename of ['hook.cjs', 'observer.cjs', 'cloud-hook.cjs', 'cloud-runtime.cjs']) { const text = fs.readFileSync(path.join(root, 'node_modules/@traceai/cursor-plugin/runtime', filename), 'utf8'); - assert.ok(!text.includes('/Volumes/nik-ext-1/'), 'tarball must not reference local source paths'); + assert.doesNotMatch(text, /\/(?:Volumes|Users)\/[\w.-]+/, 'tarball must not reference local source paths'); } console.log(JSON.stringify({ test: 'clean-packed-cursor-cli', result: 'PASS', sharedHooksQualified: true, printStreamQualified: false, registration: value.registration, activation: value.activation })); diff --git a/typescript/packages/traceai_genkit/README.md b/typescript/packages/traceai_genkit/README.md index cc144656a..673c92162 100644 --- a/typescript/packages/traceai_genkit/README.md +++ b/typescript/packages/traceai_genkit/README.md @@ -255,18 +255,16 @@ for mode in truncated masked-secret context-secret inflight request-field error- done ``` -Run the zero-code S5 matrix from `typescript` (each Node invocation must be individually wrapped by the shared-host helper when using the shared laptop): +Run the zero-code S5 matrix from `typescript`: ```bash for source in 0 1; do for mode in signed-url context-url fi-wrapper late-context background failed-context transport json-string numeric; do TS_NODE_PROJECT=packages/traceai_auto/tsconfig.json VERIFY_SOURCE="$source" \ - bash /Volumes/nikm4/futureagi/tmp/traceai-auto-review/heavy.sh \ node -r ts-node/register/transpile-only packages/traceai_genkit/contract/auto_s5.cjs "$mode" || exit done for mode in signed-url context-url json-string numeric; do TS_NODE_PROJECT=packages/traceai_auto/tsconfig.json VERIFY_SOURCE="$source" VERIFY_HIDE=1 \ - bash /Volumes/nikm4/futureagi/tmp/traceai-auto-review/heavy.sh \ node -r ts-node/register/transpile-only packages/traceai_genkit/contract/auto_s5.cjs "$mode" || exit done done @@ -278,7 +276,6 @@ Run the S6 shared-core release gate separately from the S5 regression matrix (fr for source in 0 1; do for mode in catalog-header catalog-field catalog-media; do TS_NODE_PROJECT=packages/traceai_auto/tsconfig.json VERIFY_SOURCE="$source" \ - bash /Volumes/nikm4/futureagi/tmp/traceai-auto-review/heavy.sh \ node -r ts-node/register/transpile-only packages/traceai_genkit/contract/auto_s5.cjs "$mode" || exit done done diff --git a/typescript/packages/traceai_mistral/test/attribution.test.cjs b/typescript/packages/traceai_mistral/test/attribution.test.cjs index d216801a9..559410571 100644 --- a/typescript/packages/traceai_mistral/test/attribution.test.cjs +++ b/typescript/packages/traceai_mistral/test/attribution.test.cjs @@ -124,8 +124,7 @@ for (const sdk of ['mistral-current', 'mistral-floor']) { const attrs = span.attributes; assert.equal(attrs['fi.span.kind'], 'EMBEDDING'); assert.equal(attrs['gen_ai.provider.name'], 'mistralai'); - // PENDING I1-STRICTER: hideEmbeddingVectors also hides embedding.model_name - // (LANE-CALL-NIKM4-5A-EMBEDDING-MODEL-NAME-CUT-r1). + // PENDING I1-STRICTER: hideEmbeddingVectors also hides embedding.model_name. assert.equal(attrs['embedding.model_name'], privateContent ? '__REDACTED__' : model); assert.equal(attrs['gen_ai.response.model'], error ? undefined : 'resolved-model'); if (!error) { diff --git a/typescript/packages/traceai_mistral/test/embedding-batch.test.cjs b/typescript/packages/traceai_mistral/test/embedding-batch.test.cjs index f4d53e61e..ff1f7bef4 100644 --- a/typescript/packages/traceai_mistral/test/embedding-batch.test.cjs +++ b/typescript/packages/traceai_mistral/test/embedding-batch.test.cjs @@ -67,8 +67,7 @@ for (const sdk of ['mistral-current', 'mistral-floor']) { 'fi.span.kind': 'EMBEDDING', 'gen_ai.provider.name': 'mistralai', 'gen_ai.request.model': 'requested-embedding-alias', - // PENDING I1-STRICTER: hideEmbeddingVectors also hides embedding.model_name - // (LANE-CALL-NIKM4-5A-EMBEDDING-MODEL-NAME-CUT-r1). + // PENDING I1-STRICTER: hideEmbeddingVectors also hides embedding.model_name. 'embedding.model_name': privateContent ? '__REDACTED__' : 'requested-embedding-alias', 'gen_ai.response.model': 'resolved-embedding-model', 'gen_ai.response.id': 'embedding-id',