Skip to content

fix(demo): operator identity from env + enable embedding selector - #72

Merged
CodexManvik merged 1 commit into
masterfrom
fix/demo-polish
Sep 22, 2026
Merged

CodexManvik merged 1 commit into
masterfrom
fix/demo-polish

Conversation

@CodexManvik

Copy link
Copy Markdown
Owner

Summary

  • Operator identity: hard-coded "oncall-alice" removed from all functional frontend code. A new OPERATOR_NAME constant reads VITE_OPERATOR_NAME (defaults to "demo-operator"). Every approval, rejection, runbook-draft request, and the RBAC policy display now use this value — so the audit trail shows a real, configurable actor during the presentation.

  • Embedding selector finally active: INTELLIOPS_RUNBOOK_SELECTOR_MODE was never set in docker-compose.yml, so the semantic runbook selector (ADR-026, all-MiniLM-L6-v2, cosine similarity) silently never ran despite being fully implemented and tested. Now defaults to embedding in compose. Override to off to restore keyword-only behaviour.

Files changed

File Change
frontend/src/data/api.ts Exports OPERATOR_NAME constant from VITE_OPERATOR_NAME env; used as default in decideApproval()
frontend/src/views/Governance.tsx decide() and RBAC policy table use OPERATOR_NAME
frontend/src/views/Incidents.tsx draftWithAI() uses OPERATOR_NAME
deploy/docker-compose.yml Adds INTELLIOPS_RUNBOOK_SELECTOR_MODE to rca service, defaulting to "embedding"

Test plan

  • npm run build clean (112/112 contrast checks pass — verified locally)
  • uv run pytest green (no Python changes)
  • Set VITE_OPERATOR_NAME=your-name in deploy/.env, docker compose up, approve an incident — audit trail shows your name
  • With compose up, trigger an incident whose symptom text doesn't match any keyword rule — embedding selector should surface the closest playbook (confidence_source = "embedding" in logs)

🤖 Generated with Claude Code

Two presentation-readiness fixes:

1. Hard-coded "oncall-alice" replaced everywhere in the frontend.
   A new OPERATOR_NAME constant reads VITE_OPERATOR_NAME (defaults to
   "demo-operator") and is used in decideApproval(), the Governance
   proposal decide() call, the RBAC policy display row, and the
   draftAsync() call in Incidents. Every approval, rejection, and
   runbook-draft request now shows a real, configurable actor in the
   audit trail.

2. INTELLIOPS_RUNBOOK_SELECTOR_MODE wired into docker-compose (rca
   service) defaulting to "embedding". The embedding runbook selector
   was implemented and tested (ADR-026) but never activated in compose,
   so it silently never ran. Now it runs by default; override to "off"
   to restore keyword-only behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings September 22, 2026 16:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 46912b70-c9eb-4811-8ddf-1c85d1a8542e


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@CodexManvik
CodexManvik merged commit 878392a into master Sep 22, 2026
6 checks passed
@CodexManvik
CodexManvik deleted the fix/demo-polish branch September 22, 2026 16:11
Mehulsri07 pushed a commit to Mehulsri07/intelliops that referenced this pull request Sep 23, 2026
PR CodexManvik#72 made the console act as VITE_OPERATOR_NAME, defaulting to
"demo-operator", but that name was in no role in rbac_policy.yaml and the
console image never set the variable. Every Approve, Reject and
"Draft a runbook with AI" click from a stock build was a 403.

Grant demo-operator [operator, approver], pin it as a build ARG in
Dockerfile.frontend so the identity is explicit and overridable, and add a
test that reads the default from api.ts and the Dockerfile and checks it
against the policy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants