Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT
#
# OMN-6571: Automatically enable auto-merge (squash) on every PR opened
# by jonahgabriel. Ensures PRs do not sit idle in the merge queue waiting
# by jonahgabriel. Ensures PRs do not sit idle in the merge queue waiting # onex-allow-raw-env OMN-10580 reason="CI workflow scoped to repo owner actor; not a personal credential"
# for manual enrollment.
#
# OMN-7786: Re-trigger on review and check_suite events so the workflow
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: actions/checkout@v4

- name: Enable auto-merge
if: steps.resolve.outputs.skip != 'true' && steps.resolve.outputs.actor == 'jonahgabriel'
if: steps.resolve.outputs.skip != 'true' && steps.resolve.outputs.actor == 'jonahgabriel' # onex-allow-raw-env OMN-10580 reason="CI actor gate for repo owner; not a hardcoded credential"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ steps.resolve.outputs.pr }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linear-close-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# and calls the Linear API to mark the ticket as Done.
#
# Branch name conventions supported:
# jonahgabriel/omn-XXXX-description (Linear default)
# jonahgabriel/omn-XXXX-description (Linear default) # onex-allow-raw-env OMN-10580 reason="branch name format example in comment; not a credential or connection string"
# jonah/omn-XXXX-description (short username variant)
# epic/OMN-XXXX/OMN-YYYY/run-id (epic-team branches, closes child OMN-YYYY)
# OMN-XXXX-description (bare prefix variant)
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pr-arch-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Bot identity (onexbot GitHub App):
# When ONEXBOT_APP_ID + ONEXBOT_APP_PRIVATE_KEY org secrets are set, comments are
# posted as onexbot[bot] via a short-lived installation token. Until the GitHub App
# is created, the workflow falls back to GITHUB_TOKEN (posts as jonahgabriel).
# is created, the workflow falls back to GITHUB_TOKEN (posts as github-actions[bot]).
#
# To create the app:
# https://github.com/organizations/OmniNode-ai/settings/apps/new
Expand All @@ -33,6 +33,7 @@
#
# bot_login constants in handler_thread_poster.py and handler_thread_watcher.py
# must match the actual app slug: "onexbot[bot]"
# Fallback identity is now github-actions[bot] — no personal username in the fallback path.

name: PR Architectural Review

Expand Down Expand Up @@ -80,8 +81,8 @@ jobs:
echo "Using onexbot GitHub App token"
else
echo "token=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_OUTPUT"
echo "bot_login=jonahgabriel" >> "$GITHUB_OUTPUT"
echo "ONEXBOT_APP_ID/ONEXBOT_APP_PRIVATE_KEY not set — falling back to GITHUB_TOKEN (posts as jonahgabriel)"
echo "bot_login=github-actions[bot]" >> "$GITHUB_OUTPUT"
echo "ONEXBOT_APP_ID/ONEXBOT_APP_PRIVATE_KEY not set — falling back to GITHUB_TOKEN (posts as github-actions[bot])"
fi

# ============================================================================
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-review-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
echo "Using onexbot GitHub App token"
else
echo "token=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_OUTPUT"
echo "bot_login=jonahgabriel" >> "$GITHUB_OUTPUT"
echo "bot_login=jonahgabriel" >> "$GITHUB_OUTPUT" # onex-allow-raw-env OMN-10580 reason="CI fallback bot login set to repo owner when GitHub App not configured"
Comment thread
coderabbitai[bot] marked this conversation as resolved.
echo "ONEXBOT_APP_ID/ONEXBOT_APP_PRIVATE_KEY not set — falling back to GITHUB_TOKEN"
fi

Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/reject-leaked-literals.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# SPDX-FileCopyrightText: 2026 OmniNode.ai Inc.
# SPDX-License-Identifier: MIT
#
# OMN-10554: leaked-literals gate, ADVISORY MODE.
# OMN-10580 (hardens OMN-10554): leaked-literals gate — BLOCKING MODE.
#
# Wave 0 of the Public-Shippable plan
# (`docs/plans/2026-05-05-omnimarket-public-shippable.md`).
# This workflow runs `scripts/validation/check_leaked_literals.sh blocking all`
# on every PR and on merge_group entry. Any unannotated leaked literal causes
# exit 1 and blocks merge.
#
# This workflow surfaces the leaked-literals baseline for situational
# awareness. It runs `scripts/validation/check_leaked_literals.sh advisory all`
# on every PR and on merge_group entry, prints findings to the run log, and
# ALWAYS exits 0. It is NOT a required status check.
# To permit a legitimate occurrence, add an inline annotation on the same line:
# # onex-allow-internal-ip OMN-XXXXX reason="<concrete reason>"
# # onex-allow-local-path OMN-XXXXX reason="<concrete reason>"
# # onex-allow-test-fixture OMN-XXXXX reason="<concrete reason>"
# # onex-allow-raw-env OMN-XXXXX reason="<concrete reason>"
# # onex-allow-model-id OMN-XXXXX reason="<concrete reason>"
#
# Wave 3 (Task 8 blocking-mode) flips MODE to `blocking` after Tasks 3+7 land
# their scrubs and brings this workflow under "required status checks". Until
# then, finding count is informational and downstream tasks consume the report.
# See docs/leaked-literals-governance.md for the full governance policy.
#
# This job is a REQUIRED STATUS CHECK. The job name
# "Leaked Literals Gate" must match branch protection rules.

name: Leaked Literals Gate (advisory)
name: Leaked Literals Gate

on:
pull_request:
Expand All @@ -27,15 +31,15 @@ permissions:
contents: read

jobs:
leak-gate-advisory:
name: Scan for leaked literals (advisory)
leak-gate:
name: Leaked Literals Gate
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run leak gate in advisory mode
- name: Run leak gate in blocking mode
run: |
bash scripts/validation/check_leaked_literals.sh advisory all
bash scripts/validation/check_leaked_literals.sh blocking all
214 changes: 214 additions & 0 deletions .leaked-literals-allowlist.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
# Leaked Literals Allowlist — OMN-10580
#
# This file is the machine-readable registry of all intentional
# leaked-literal exemptions in this repo.
#
# Governance: docs/leaked-literals-governance.md
# Gate script: scripts/validation/check_leaked_literals.sh
#
# Format:
# - file: <repo-relative path>
# type: per_line | file_level | self_exempt
# ticket: OMN-XXXXX
# reason: <one-line explanation>
#
# NOTE: The gate script does NOT parse this file at runtime — exemptions are
# enforced via inline annotations (# onex-allow-* comments) and the
# SELF_EXEMPT_FILES array in check_leaked_literals.sh. This YAML is a
# human-readable audit trail only.

exemptions:
# ── Self-exempt (pattern catalog / CI workflow / this governance doc) ──────
- file: scripts/validation/check_leaked_literals.sh
type: self_exempt
ticket: OMN-10580
reason: contains the LEAK_REGEX pattern catalog; self-referential by necessity

- file: .github/workflows/reject-leaked-literals.yml
type: self_exempt
ticket: OMN-10580
reason: CI workflow that invokes the gate script; references annotation syntax in docs

- file: docs/leaked-literals-governance.md
type: self_exempt
ticket: OMN-10580
reason: governance doc showing annotation examples; self-referential

- file: docs/audits/2026-05-05-raw-env-usage.csv
type: self_exempt
ticket: OMN-10580
reason: generated audit report containing literal inventory as data rows

- file: docs/audits/2026-05-05-raw-env-usage.md
type: self_exempt
ticket: OMN-10580
reason: generated audit summary referencing literal patterns as data

- file: docs/audits/2026-05-05-contracts-dir-references.csv
type: self_exempt
ticket: OMN-10580
reason: generated audit report; path references are data rows, not source defaults

- file: docs/tracking/delegation-cost-projection-lane.md
type: self_exempt
ticket: OMN-10580
reason: tracking doc with config examples and lab address as orientation hints

# ── File-level exemptions (test fixtures) ────────────────────────────────
- file: tests/test_emergency_bypass_parser.py
type: file_level
ticket: OMN-10580
reason: uses jonahgabriel as synthetic actor in bypass-parser test corpus

- file: tests/unit/config/test_settings.py
type: file_level
ticket: OMN-10580
reason: pattern catalog in assertions for Settings validation tests

- file: tests/unit/scripts/test_leak_gate.py
type: file_level
ticket: OMN-10580
reason: writes synthetic leaky files to test the gate script itself

- file: tests/nodes/node_pr_review_bot/test_workflow_runner_wiring.py
type: file_level
ticket: OMN-10580
reason: LLM wiring test using lab endpoints as allowed-endpoint inputs

- file: tests/test_webhook_reconciler.py
type: file_level
ticket: OMN-10580
reason: uses lab git actor handle as synthetic PR author in webhook test fixtures

- file: tests/unit/scripts/test_run_delegation_cost_projection_process.py
type: file_level
ticket: OMN-10580
reason: uses lab Kafka address as monkeypatched env var in delegation cost tests

- file: tests/unit/nodes/node_overnight/test_main_publish_events.py
type: file_level
ticket: OMN-10580
reason: sets lab Kafka bootstrap address via monkeypatch to test event publishing

- file: tests/unit/experiments/adk_eval/harness/test_aggregator.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint and model ID as test inputs to verify aggregator wiring

- file: tests/nodes/node_ab_inference_effect/test_handler.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint as allowed-endpoint test input in request fixtures

- file: tests/test_session_bootstrap_rev7.py
type: file_level
ticket: OMN-10580
reason: asserts /Users/jonah does NOT appear in prompts; literal appears in assertion string

- file: tests/test_model_router_routes_to_local_first.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint as router test input to verify local-first routing

- file: tests/test_golden_chain_local_supervisor.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in routing fixtures for local supervisor golden chain

- file: tests/nodes/node_merge_sweep_triage_orchestrator/test_phase2_command_models.py
type: file_level
ticket: OMN-10580
reason: uses lab endpoint as command model test input

- file: tests/integration/test_cost_event_publisher_kafka.py
type: file_level
ticket: OMN-10580
reason: integration test using lab Kafka bootstrap address as test target

- file: tests/conftest.py
type: file_level
ticket: OMN-10580
reason: lab endpoints used as fixture defaults for golden chain tests

- file: tests/test_model_router_exponential_backoff.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in router backoff test inputs

- file: tests/test_model_router_fallback_on_degradation.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in router fallback test inputs

- file: tests/test_model_router_health_check_degrades.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in router health-check test inputs

- file: tests/test_model_router_publishes_degradation_event.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in degradation event test inputs

- file: tests/test_runtime_sha_verify_handler.py
type: file_level
ticket: OMN-10580
reason: uses lab endpoint as SHA verify handler test input

- file: tests/test_golden_chain_nightly_loop_controller.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in nightly loop controller test fixtures

- file: tests/test_golden_chain_pr_lifecycle_upgrade.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in PR lifecycle upgrade test fixtures

- file: tests/test_golden_chain_review_thread_reconciler.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint in review thread reconciler test fixtures

- file: tests/nodes/node_ci_fix_effect/test_handler_ci_fix.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint as CI fix effect test input

- file: tests/nodes/node_thread_reply_effect/test_handler_thread_reply.py
type: file_level
ticket: OMN-10580
reason: uses lab git actor handle as synthetic PR branch name in test fixtures

- file: tests/test_model_router_authorization_and_ttl.py
type: file_level
ticket: OMN-10580
reason: uses lab LLM endpoint as router authorization/TTL test input

# ── Per-line annotations (source files) ──────────────────────────────────
# Listed here for discoverability; authoritative annotation is inline in the source.

- file: scripts/projection_api_server.py
type: per_line
ticket: OMN-10580
reason: env-var fallback to lab Postgres; override via POSTGRES_HOST / POSTGRES_PORT

- file: src/omnimarket/nodes/node_baseline_capture/handlers/probes/probe_kafka_topics.py
type: per_line
ticket: OMN-10580
reason: env-var fallback to lab Redpanda admin; override via REDPANDA_ADMIN_HOST

- file: src/omnimarket/nodes/node_baseline_capture/handlers/probes/probe_system_health.py
type: per_line
ticket: OMN-10580
reason: env-var fallbacks to lab service endpoints; overrideable per env var

- file: src/omnimarket/nodes/node_platform_readiness/handlers/handler_platform_readiness.py
type: per_line
ticket: OMN-10580
reason: env-var fallback SSH target for lab infra; override via ONEX_INFRA_SSH_TARGET

- file: src/omnimarket/nodes/node_projection_llm_cost/consumer.py
type: per_line
ticket: OMN-10580
reason: env-var fallback to lab Postgres; override via POSTGRES_HOST
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ repos:
# Requires omnibase_infra at $OMNIBASE_INFRA_PATH or ../omnibase_infra.
- repo: local
hooks:
# OMN-10580: Leaked-literals gate — blocks hardcoded LAN IPs, personal
# paths, private model IDs from being committed. Add an inline annotation
# to exempt a legitimate occurrence (see docs/leaked-literals-governance.md).
- id: leaked-literals-gate
name: Leaked literals gate (OMN-10580)
language: system
entry: bash scripts/validation/check_leaked_literals.sh blocking diff
pass_filenames: false
stages: [pre-commit]

- id: topic-naming-lint
name: Topic Naming Lint
language: system
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.projection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ x-projection-defaults: &projection-defaults
network_mode: host
env_file: .env
environment:
KAFKA_BROKERS: ${KAFKA_BROKERS:-192.168.86.201:19092}
KAFKA_BROKERS: ${KAFKA_BROKERS:-192.168.86.201:19092} # onex-allow-internal-ip OMN-10580 reason="compose env-var fallback to lab Kafka; KAFKA_BROKERS must be set for non-lab deployments"
OMNIDASH_ANALYTICS_DB_URL: ${OMNIDASH_ANALYTICS_DB_URL}
KAFKA_CONSUMER_GROUP: ${KAFKA_CONSUMER_GROUP:-omnimarket-projections-v1}
PYTHONUNBUFFERED: "1"
Expand Down
1 change: 0 additions & 1 deletion docs/audits/2026-05-05-contract-config-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ These nodes have handler imports that suggest transport usage not declared in `d
| `node_navigation_history_reducer` | postgres | handler uses ['postgres'] but contract dependencies[] does not declare it |
| `node_pr_review_bot` | llm | handler uses ['llm'] but contract dependencies[] does not declare it |
| `node_projection_llm_cost` | kafka,postgres | handler uses ['postgres'] but contract dependencies[] does not declare it |

Loading
Loading