Skip to content

fix(identity): purge forbidden upstream identity residue (AP-ISS-0171) - #149

Open
khanhkit wants to merge 9 commits into
mainfrom
kit/KitDev23/session-4
Open

khanhkit wants to merge 9 commits into
mainfrom
kit/KitDev23/session-4

Conversation

@khanhkit

@khanhkit khanhkit commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Scope

AP-ISS-0171: remove forbidden former-base identity from active AgentProxy runtime, source, config, tests, docs and package contracts while maintaining neutral structural migration support. Includes tracked machine-readable identity classification manifest.

Evidence — executed source gates (2026-10-20, KitDev23 Gen14)

  • node scripts/check/check-agentproxy-identity.mjs: PASS, zero active former-base identity.
  • git diff --check: PASS.
  • tsx --test tests/unit/build/check-agentproxy-identity-0113.test.ts tests/unit/selective-migration-normalize-0127.test.ts tests/unit/12627-catalog-inflight-timeout.test.ts: 16/16 PASS.
  • tsx --test tests/integration/selective-migration-0127.test.ts: 3/3 PASS.
  • Disposable git merge-tree of local task reconciliation HEAD 253547fa3f21603f4003d12ee9b6283a03e6dbb1 with current main cf9a1a04e1d57c32d9b0d74d4a8b68ecfc6f921a: clean, no conflicts; merged tree 2fc8c78a03fe6351aa8de5dddedcbd701ec91515, zero forbidden identity matches.

Executed output (focused/local only; not terminal package proof)

[agentproxy-identity] OK — no active former-base identity remains
git diff --check: PASS
identity/migration/#12627: tests 16, pass 16, fail 0
selective migration integration: tests 3, pass 3, fail 0
plugin-v2 after test fix: tests 248, pass 247, fail 0, skipped 1
test-masking assertion counts: credentials 18 -> 18; identity guard 9 -> 9
new focused credential/identity tests: tests 11, pass 11, fail 0
merged PR tree: zero forbidden identity matches

NOT YET COMPLETE — DO NOT MERGE

  • Published PR branch HEAD is 646fe11ec9abada4cb4ea8b3f31a54317cabe65e; local owned HEAD is 576b0e46f7a6776f523a8762205bf999f640da9f. Both carry identical two fixed-test blob SHAs. GitHub PR merge 662b7b9a5a6857571bb1833ca605df87d68146d3 and independent local preview have identical tree SHA 862026f1a9400a15cd9355fbe9ebc997d3b58f30. Do not mistake one head's artifact for another head's proof.
  • Current-main reconciliation has zero-conflict merge-tree equality proof, but final immutable artifact SHA/provenance still needs terminal verification. PR is Ready for review only to run full CI; DO NOT merge until terminal proof and independent auditor approval.
  • Need terminal generated/standalone/CLI release build, bounded canonical stage-npm-package.mjs, exactly one npm pack, binary-safe name/content scan of generated, staged and tarball outputs, and tar SHA-256/contents/embedded BUILD_SHA.
  • Need fresh independent KitAuditor verdict bound to the final immutable SHA, exact-head CI, and accepted main integration before marking AP-ISS-0171 DONE or releasing dependent AP-ISS-0136.
  • Historical package proof from 225b315... is not terminal proof for a later merge SHA.

Data-is-Gold: preserve KitDev23 owned worktree, handoff, claim and task_run; no broad reset/rebase; review any overlap with concurrently owned runtimeSettings.ts before source mutation.

@khanhkit
khanhkit marked this pull request as ready for review October 20, 2026 12:19

Copy link
Copy Markdown
Owner Author

AP-ISS-0171 Gen14 review infrastructure blocker (2026-10-20, evidence-bound)

  • Current PR head: 646fe11ec9abada4cb4ea8b3f31a54317cabe65e; local worker-owned equivalent two-test blobs at 576b0e46f7a6776f523a8762205bf999f640da9f.
  • OpenCodeReview dispatcher run 39422695135 failed because child run 39422938577, job 118628454566, step Run OpenCodeReview, produced ocr: command not found and OCR_EXIT_CODE=127. ARM queue attempt was cancelled on timeout before fallback. No reviewer verdict or code finding was produced. This is an infrastructure failure, NOT a review PASS or substantive source rejection.
  • GitHub PR Test Policy on refreshed run 39422694899 is SUCCESS after restoring two meaningful tests (18→18 and 9→9 assertion counts). Local guard GITHUB_BASE_SHA=cf9a1a04... npm run check:test-masking PASS, source identity scan PASS.
  • CI Build/Package Canonical Pack are still required; do not merge until immutable merge-tree package/generation evidence and fresh independent KitAuditor verdict are recorded. Current PR merge tree 862026f1a9400a15cd9355fbe9ebc997d3b58f30 is equal to local disposable merge preview.

NEXT: project reviewer/infrastructure owner should restore pinned OCR executable (or provide an independent supported KitAuditor review bound to the exact final SHA). Preserve all KitDev23 WIP and the existing claim/task_run. No audit verdict is being forged.

Copy link
Copy Markdown
Owner Author

PR #149 CI baseline attribution (2026-10-20): nonwaived red

Current refreshed PR CI run 39422694899: Rust Quality failed in Audit Rust advisories, licenses, bans and sources, and Security Tests failed its prerequisite gate because Rust Quality was red. Exact integrated baseline main cf9a1a04e1d57c32d9b0d74d4a8b68ecfc6f921a CI run 38999599027 failed the same two jobs and same specific steps. Compared logs for baseline Rust job 117299568172 and PR Rust job 118628611660: same unavailable stable-x86_64-unknown-linux-musl toolchain in container and same four Rust advisories (client session Debug TLS secrets, ECH rejection buffer, Brotli certificate decompression, ServerHello classical downgrade); advisories FAILED, others passed. This is grounded baseline-red evidence, not a waiver or CI PASS. Project release/Architect must decide a supported disposition; no changes to Rust security gates under AP-ISS-0171.

Other checked lanes on current PR: PR Test Policy, Lint, Quality Gates Extended, dependency review, Docs Sync, Vitest, i18n and one integration lane succeeded. Build / canonical package / remaining shards still pending. Do not merge/close until terminal exact-head artifact proof and independent KitAuditor verdict.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

CI Coverage Report

  • Coverage job: success
  • PR test policy: success

Coverage artifact was not available for this run.

Copy link
Copy Markdown
Owner Author

AP-ISS-0171 Unit Tests (2/8) real regression FIXED — HEAD UPDATED, rerun required (2026-10-20).

  • Old PR head 646fe11ec9abada4cb4ea8b3f31a54317cabe65e failed CI unit shard 2/8 in tests/unit/cli-helper/config-request.test.ts (canonical header wins when both aliases are present: legacy-secret overrode canonical-secret). Root cause: AP-ISS-0171's forbidden legacy header rename had collapsed LEGACY_CONFIG_API_KEY_HEADER to the same string as canonical CONFIG_API_KEY_HEADER, making computed object headers overwrite each other.
  • Canonical invariant fix: remove the obsolete legacy alias export/fallback and accept only the x-agentproxy-config-api-key canonical header. Replace obsolete legacy tests with tests verifying unrecognized header is rejected and cannot override canonical. No forbidden upstream identifier restored.
  • Local owned KitDev23 Gen14 commit f10a7297932335c272f6fac080b92cf10f08586c, clean worktree; published via GitHub expected-SHA CAS on PR branch at new HEAD 178390638347f2b8fff8d0ebc17c2ea51a22d65a (no force). Production and test blob SHAs match exactly between local and GitHub: 6a7e4b24143ffaa3806462835fe5d16e9f013109, b0acc82a6d612a45859d11261a89f62448ea9721.
  • Real executed local gates: changed config-request test 5/5 PASS, combined identity+config tests 8/8 PASS, full check:test-masking PASS, identity scanner PASS, git diff --check PASS.
  • All CI/review results for old SHA 646fe11... are historical. Revalidate against immutable new PR HEAD and new merge tree. DO NOT MERGE: canonical packaged artifact and independent KitAuditor verdict still missing. OCR tool infrastructure blocked (exit 127); Rust advisories baseline-red unwaived.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🔍 OpenCodeReview found 5 issue(s) in this PR.

  • ✅ Successfully posted inline: 5 comment(s)

⚠️ 1 warning(s) occurred during review.


⚠️ Warnings:

  • src/i18n/messages/gu.json (token_threshold_exceeded): prompt tokens (161591) exceed 80% of max_tokens(200000) [round 1]

Comment thread bin/cli/commands/env.mjs Outdated
Comment thread scripts/check/check-agentproxy-identity.mjs
Comment thread docs/openapi.yaml Outdated
Comment thread open-sse/services/cache/semanticCacheManager.ts Outdated
Comment thread open-sse/services/cache/semanticCacheManager.ts Outdated
Comment thread open-sse/services/routingStrategies.ts
Comment thread src/i18n/messages/da.json Outdated
Comment thread src/i18n/messages/da.json Outdated
Comment thread src/i18n/messages/hr.json
"memoryEnabledDesc": "Kada je omogućeno, OmniRoute će ubaciti relevantni prošli kontekst.",
"memoryTokenCostWarning": "Napomena: s omogućenom memorijom, OmniRoute ubacuje do {tokens} tokena dohvaćenog konteksta u svaki zahtjev za razgovor — to povećava potrošnju tokena i troškove. Da biste preskočili ubacivanje za određeni zahtjev, pošaljite zaglavlje \"x-omniroute-no-memory: true\".",
"memoryEnabledDesc": "Kada je omogućeno, AgentProxy će ubaciti relevantni prošli kontekst.",
"memoryTokenCostWarning": "Napomena: s omogućenom memorijom, AgentProxy ubacuje do {tokens} tokena dohvaćenog konteksta u svaki zahtjev za razgovor — to povećava potrošnju tokena i troškove. Da biste preskočili ubacivanje za određeni zahtjev, pošaljite zaglavlje \"x-agentproxy-no-memory: true\".",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
These localized executable identifiers were renamed, but runtime evidence still needs validation: the documented MCP tool names are generated from legacy omniroute_* contracts, and the memory bypass header may still be x-omniroute-no-memory. Users following these Croatian instructions may call nonexistent tools or fail to disable memory. Keep the runtime identifiers unless the corresponding contracts are migrated too.

Suggestion:

Suggested change
"memoryTokenCostWarning": "Napomena: s omogućenom memorijom, AgentProxy ubacuje do {tokens} tokena dohvaćenog konteksta u svaki zahtjev za razgovor — to povećava potrošnju tokena i troškove. Da biste preskočili ubacivanje za određeni zahtjev, pošaljite zaglavlje \"x-agentproxy-no-memory: true\".",
"mcpQuickStartStep3": "Pozovite alate poput `omniroute_get_health` i `omniroute_list_combos`."

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified the concrete reviewed Croatian claim: x-agentproxy-no-memory is an implemented runtime header in open-sse/handlers/chatCore/headers.ts and routed in open-sse/handlers/chatCore.ts; tests/unit/no-memory-header.test.ts covers the contract. The reviewed i18n line is not an MCP tool declaration. Any separate MCP tool-name mismatch needs an exact current runtime tool name and matching translation key; please identify such a path to verify it independently. The previous branded literal is prohibited by AP-ISS-0171.

Comment thread src/i18n/messages/ja.json Outdated
Comment thread src/i18n/messages/mr.json Outdated
Comment thread src/i18n/messages/ro.json Outdated
Comment thread src/i18n/messages/uz.json
…collections

Mirror the seven verified tracked-file blobs from KitDev23's durable local commit 59b34eed881915c85d893b277cceb3827e7b8a2f. Preserve all other published-branch content and existing parent history. Add regression tests for unique env keys, canonical cache lookup and Japanese brand strings.
Mirror the two exact verified blobs from KitDev23 durable local commit 891b3c38cb2bbf2fcfe0303de8b9db2cab193d11. Preserve all other PR files and history. TDD regression guards against advertising a nonexistent legacy alias.
Comment thread bin/agentproxy.mjs
// world-traversable data dir. Repair them on every run that touches encrypted storage
// (best-effort; group bits are kept). Informational commands never reach this block.
tightenDataDirSecrets(process.env.DATA_DIR || join(homedir(), ".omniroute"));
tightenDataDirSecrets(process.env.DATA_DIR || join(homedir(), ".agentproxy"));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security · medium
getDefaultDataDir() accounts for AppImage/Flatpak installs by using $XDG_DATA_HOME/AgentProxy; this fallback instead points the permissions repair at ~/.agentproxy, leaving the actual data directory unprotected when DATA_DIR is unset. Use getDefaultDataDir() here.

Suggestion:

Suggested change
tightenDataDirSecrets(process.env.DATA_DIR || join(homedir(), ".agentproxy"));
tightenDataDirSecrets(process.env.DATA_DIR || getDefaultDataDir());

Comment thread bin/cli/locales/lv.json
},
"doctor": {
"title": "OmniRoute Diagnostika",
"title": "AgentProxy Diagnostika",
"dbOk": "Datubāze: kārtībā ({path})",
"dbMissing": "Datubāze nav inicializēta — palaidiet `omnīroute setup`",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
This untranslated legacy command is misspelled (omnīroute) and no longer exists; users following database recovery guidance cannot initialize the database. Replace it with agentproxy setup.

Suggestion:

Suggested change
"dbMissing": "Datubāze nav inicializēta — palaidiet `omnīroute setup`",
"dbMissing": "Datubāze nav inicializēta — palaidiet `agentproxy setup`",

@@ -82,10 +82,10 @@ async function extractEndpointFromConfig(
return match ? match[1] : null;
}
case "omp": {
const omnirouteBlock = content.match(/omniroute:\s*\n(?:[^\n]+\n)*?\s*baseUrl:\s*["']?([^"'\r\n]+)["']?/i);
if (omnirouteBlock) return omnirouteBlock[1].trim();
const agentproxyBlock = content.match(/agentproxy:\s*\n(?:[^\n]+\n)*?\s*baseUrl:\s*["']?([^"'\r\n]+)["']?/i);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
OMP configs using the legacy omniroute: provider key are no longer recognized here. They fall through to the generic baseUrl search, which can report another provider’s endpoint as AgentProxy’s. Match both agentproxy and omniroute (or normalize the legacy key) to preserve existing configurations.

Suggestion:

Suggested change
const agentproxyBlock = content.match(/agentproxy:\s*\n(?:[^\n]+\n)*?\s*baseUrl:\s*["']?([^"'\r\n]+)["']?/i);
const agentproxyBlock = content.match(/(?:agentproxy|omniroute):\s*\n(?:[^\n]+\n)*?\s*baseUrl:\s*["']?([^"'\r\n]+)["']?/i);

Comment thread src/i18n/messages/ig.json
"memoryEnabledDesc": "Mgbe akwadoro ya, OmniRoute ga-etinye ọnọdụ gara aga dị mkpa.",
"memoryTokenCostWarning": "Mara nke a: mgbe akwadoro ncheta, OmniRoute na-etinye ihe ruru token {tokens} nke ọnọdụ ewepụtara n'ime arịrịọ nkata ọ bụla — nke a na-abawanye ojiji token na ọnụ ahịa. Iji wụfee ntinye a maka otu arịrịọ kpọmkwem, zipụ nkụnyeisi \"x-omniroute-no-memory: true\".",
"memoryEnabledDesc": "Mgbe akwadoro ya, AgentProxy ga-etinye ọnọdụ gara aga dị mkpa.",
"memoryTokenCostWarning": "Mara nke a: mgbe akwadoro ncheta, AgentProxy na-etinye ihe ruru token {tokens} nke ọnọdụ ewepụtara n'ime arịrịọ nkata ọ bụla — nke a na-abawanye ojiji token na ọnụ ahịa. Iji wụfee ntinye a maka otu arịrịọ kpọmkwem, zipụ nkụnyeisi \"x-agentproxy-no-memory: true\".",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
This replaces the documented opt-out header, but the runtime still accepts only x-agentproxy-no-memory (and existing clients may use the prior x-omniroute-no-memory). Sending this localized instruction will no longer skip memory injection. Keep the actual supported header, or update runtime compatibility before changing it.

Suggestion:

Suggested change
"memoryTokenCostWarning": "Mara nke a: mgbe akwadoro ncheta, AgentProxy na-etinye ihe ruru token {tokens} nke ọnọdụ ewepụtara n'ime arịrịọ nkata ọ bụla — nke a na-abawanye ojiji token na ọnụ ahịa. Iji wụfee ntinye a maka otu arịrịọ kpọmkwem, zipụ nkụnyeisi \"x-agentproxy-no-memory: true\".",
"memoryTokenCostWarning": "Mara nke a: mgbe akwadoro ncheta, AgentProxy na-etinye ihe ruru token {tokens} nke ọnọdụ ewepụtara n'ime arịrịọ nkata ọ bụla — nke a na-abawanye ojiji token na ọnụ ahịa. Iji wụfee ntinye a maka otu arịrịọ kpọmkwem, zipụ nkụnyeisi \"x-agentproxy-no-memory: true\".",

Comment thread src/i18n/messages/ro.json
@@ -7589,7 +7589,7 @@
"qdrantEmbeddingModel": "Model de încorporare",
"qdrantHelpTitle": "Ajutor pentru configurarea rapidă",
"qdrantHelpQuickTitle": "Configurare rapidă (Qdrant + OpenRouter)",
"qdrantHelpStep1": "1. Gazdă: IP/URL Qdrant, Port: 6333, Colecție: omniroute_memory.",
"qdrantHelpStep1": "1. Gazdă: IP/URL Qdrant, Port: 6333, Colecție: agentproxy_memory pentru instalări noi; pentru instalări existente păstrați numele colecției curente (QDRANT_COLLECTION).",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bug · medium
Existing Qdrant installs that relied on the old default collection have no QDRANT_COLLECTION override. The runtime now defaults to agentproxy_memory, so they silently read/write a new empty collection and leave existing vectors inaccessible. Mention QDRANT_COLLECTION=omniroute_memory for existing installs, or provide an explicit migration.

Suggestion:

Suggested change
"qdrantHelpStep1": "1. Gazdă: IP/URL Qdrant, Port: 6333, Colecție: agentproxy_memory pentru instalări noi; pentru instalări existente păstrați numele colecției curente (QDRANT_COLLECTION).",
"qdrantHelpStep1": "1. Gazdă: IP/URL Qdrant, Port: 6333, Colecție: agentproxy_memory pentru instalări noi; pentru instalările existente fără QDRANT_COLLECTION, setați QDRANT_COLLECTION=omniroute_memory.",

Copy link
Copy Markdown
Owner Author

GoalKeeper exact-head CI root-cause triage — 2026-10-21 ICT (read-only, NO SOURCE MUTATION)

PR #149 published HEAD cdc16a96789c36d8e66a9100fee9211f56b19e85. CI run 39546079286 = FAILURE; exact-head API Route Typecheck, Semgrep, DAST, CodeQL and OpenCodeReview have completed SUCCESS. The failure is not a generic CI red:

  1. Lint job 119045134957 exits 2 at npm run check:agent-skills-sync: generator dry-run reports Generated: 1 · Unchanged: 45 with missing + omni-cli-tools. This may conflict with AP-ISS-0171 forbidden upstream identity; fix the generator's intended current product/skill contract and regenerated outputs together under review, not by blindly reintroducing a forbidden omni-* artifact just to pass.
  2. Rust Quality job 119045135003 fails on missing stable-x86_64-unknown-linux-musl toolchain override and multiple cargo deny TLS / rustls / webpki advisories. Establish exact base-vs-PR provenance before marking any advisory inherited or waivable; do not suppress security checks.
  3. Security Tests job 119046185098 reports Rust Quality did not pass: failure (derived gate, not a separate source assertion).

No close/merge: terminal exact-head build+single artifact identity/BUILD_SHA scan, all blocking CI, current OCR threads, and independent KitAuditor signoff remain required. Distinct control-plane circular phase issue is already recorded in KitControl #125; that governance defect must be fixed without changing AP-ISS-0171's pre-release product identity acceptance. KitDev23 retains its original claim/task-run/worktree and any unique WIP. This comment changes no source/authority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant