Skip to content

release: v0.3.0#44

Merged
fvadicamo merged 20 commits into
mainfrom
develop
Mar 22, 2026
Merged

release: v0.3.0#44
fvadicamo merged 20 commits into
mainfrom
develop

Conversation

@fvadicamo

@fvadicamo fvadicamo commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

What

This release includes:

  • feat(learn): optional enrollment mode for LMS integrations (FEAT-003)
  • feat(learn): widget UX improvements (collapsible sources, a11y, i18n)
  • fix: Phase 2 stabilization (BUG-010, BUG-011, DEBT-002, DEBT-003, DEBT-008)
  • chore: version bump, CHANGELOG, documentation updates

Why

Completes Sprint 1 of the post-Phase 2 roadmap. Stabilizes the e-learning vertical and widget for pilot deployment.

Details

PR #42: feat(learn): optional enrollment for LMS integrations

  • Optional enrollment mode (VEKTRA_LEARN_REQUIRE_ENROLLMENT)
  • Widget: collapsible sources, a11y (aria-controls, focus-visible), i18n
  • BUG-010: auto-generate conversation_id for multi-turn continuity
  • BUG-011: sparse embedding generation for hybrid search
  • DEBT-002: streaming QueryTrace via SSE
  • DEBT-003: post_retrieval safeguard boundary
  • DEBT-008: TTLCache for API key verification
  • Combo D RAG tuning defaults, OpenAI-compatible API base

PR #43: chore: prepare v0.3.0 release

  • Version bump 0.2.0-dev to 0.3.0
  • CHANGELOG v0.2.0 (retroactive) and v0.3.0
  • Commit signing guide in CONTRIBUTING.md
  • Documentation: 6 stale defaults fixed, 18 new config vars, ERR-LEARN codes
  • Phase references removed from user-facing docs

Testing

  • 578 unit tests passing
  • 19/19 CI checks green
  • Integration tests + NFR gates passing

Checklist

  • All tasks completed
  • No breaking changes
  • CHANGELOG updated
  • Version bumped
  • Documentation updated

Summary by CodeRabbit

  • New Features

    • Optional learn enrollment mode; webhook configuration; OpenAI-compatible LLM base URL
    • Query rewriting and reranking controls; optional sparse embeddings
    • Collapsible, accessible citation display and explicit “no relevant context” handling in the chat widget
  • Improvements

    • Updated defaults: advanced query pipeline, multilingual embedding model, larger token reserve, smaller chunking
    • Configurable host service ports; more robust health checks and longer LLM fallback timeout
  • Documentation

    • Expanded configuration reference, error codes, changelog, and contributing guide

francescoscalzo and others added 7 commits March 21, 2026 17:09
- Optional enrollment mode for LMS integrations (FEAT-003)
- Widget UX: collapsible sources, markdown-ready citations, a11y improvements
- Sparse embedding generation during ingest (BUG-011), conversation auto-ID (BUG-010)
- Registry None guard in health check, sparse embedding count validation
- Combo D RAG tuning defaults, OpenAI-compatible API base, parameterized ports

Reviews: 16/16 addressed (CodeRabbit 12, Gemini 1, manual 3)
Tests: 578 passed
Refs: FEAT-003, BUG-010, BUG-011, DEBT-002, DEBT-003, DEBT-008
- Add CHANGELOG entries for v0.2.0 (retroactive) and v0.3.0
- Bump all pyproject.toml and __version__ from 0.2.0-dev to 0.3.0
- Add commit signing setup guide to CONTRIBUTING.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use $(git config user.email) in allowed_signers example (Gemini)
- Hyphenate "rate-limiting middleware" in CHANGELOG (CodeRabbit)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README: Phase 2 status "Planned" -> "Complete"
- CONTRIBUTING: test command includes analytics/learn, module boundaries
  updated from 5 to 8 components
- GOVERNANCE: Phase 2 transition criteria updated
- configuration.md: fix 6 stale defaults (Combo D), add 18 new Phase 2
  variables (rewrite, rerank, webhook, qdrant, learn, pii)
- error-codes.md: add ERR-LEARN-001 through 004
- .env.example: add Phase 2 variable sections

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add phase qualifiers to security vars (safeguard, multi_tenant, conversation_key)
- Add "Phase 2 only" to analytics_retention_days
- Fix variable count: 53 VEKTRA_* across VektraSettings + Phase 2 sub-configs
- Clarify that Phase 2 sub-configs are validated independently

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Development phases are internal process milestones, not user-facing
distinctions. All features are available, no need to label their origin.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bump version 0.2.0-dev to 0.3.0 (8 pyproject.toml + 3 __init__.py)
- Add CHANGELOG entries for v0.2.0 (retroactive) and v0.3.0
- Update docs: 6 stale defaults fixed, 18 new config vars, ERR-LEARN codes
- Add commit signing guide to CONTRIBUTING.md
- Update README/GOVERNANCE/CONTRIBUTING for Phase 2 completion

Reviews: 5/5 addressed (CodeRabbit 3, Gemini 2)
Tests: 578 passed
@fvadicamo fvadicamo added this to the v0.3.0 milestone Mar 21, 2026
@fvadicamo fvadicamo added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 21, 2026
@coderabbitai

coderabbitai Bot commented Mar 21, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 36c2b9ed-3338-4fbc-80aa-7b1f1e865a3d

📥 Commits

Reviewing files that changed from the base of the PR and between a36b191 and fad9f39.

📒 Files selected for processing (1)
  • vektra-learn/src/vektra_learn/service.py

📝 Walkthrough

Walkthrough

Configuration defaults and environment surface updated for v0.3.0 (LLM api_base, query rewrite/rerank, webhooks, PII threshold, ingest table/parent-child), package version bumps, learn enrollment/namespace behavior and conversation auto-generation, sparse embeddings support, safeguards fallback, health-tier separation, widget UI/behavior changes, and docker-compose port parameterization.

Changes

Cohort / File(s) Summary
Release Metadata
vektra-*/pyproject.toml, vektra-*/src/vektra_*/__init__.py
Version bumps to 0.3.0 across packages and module __version__ updates.
Env & Docs
.env.example, docs/reference/configuration.md, CHANGELOG.md
Added VEKTRA_LLM_API_BASE, rerank/rewrite, webhooks, learn JWT/enrollment, Qdrant settings; updated defaults (LLM fallback timeout 30→60s, embedding model, query pipeline→advanced, token reserve→2048, chunk size/overlap→500/100); .env.example expanded.
Docker / CI
.gitignore, docker-compose.yml, CONTRIBUTING.md
Ignored docker-compose.ports.yml; docker-compose host ports parameterized via env vars; CONTRIBUTING updated (tests, commit signing, module boundaries).
Shared Config
vektra-shared/src/vektra_shared/config.py, vektra-shared/tests/test_config.py
Added api_base and learn_require_enrollment fields; updated many defaults to match docs; tests adjusted to new defaults.
Providers & Health
vektra-core/src/vektra_core/providers/litellm_provider.py, vektra-index/src/vektra_index/providers/qdrant.py, vektra-admin/src/vektra_admin/health.py
Litellm forwards api_base to litellm calls and uses larger health probe; Qdrant deadline detection relaxed and logs race on ensure_collection; health check split into shallow (excludes llm) and deep (includes llm) and guards registry is None.
Core Pipeline & Safeguards
vektra-core/src/vektra_core/pipeline.py, vektra-core/src/vektra_core/safeguards/__init__.py, vektra-core/tests/test_safeguards.py
Post-retrieval safeguard re-evaluates no_relevant_context when chunks get filtered; create_safeguard falls back to PassthroughSafeguard on unknown modes or Presidio import failures; tests adapted.
Ingest
vektra-ingest/src/vektra_ingest/pipeline.py, scripts/ingest.sh, vektra-ingest/tests/*
Optional sparse embeddings per chunk with length validation (raises ERR_INGEST_004 on mismatch); ingest script adds .md mapping to text/markdown; test mocks updated to control registry.has.
Learn API & Service
vektra-learn/src/vektra_learn/api.py, vektra-learn/src/vektra_learn/service.py, vektra-learn/tests/*
course_id required in JWT otherwise ERR_LEARN_003; namespace resolution gated by learn_require_enrollment; auto-generate conversation_id when missing; TokenRequest adds optional namespace; tests added/extended.
Widget & UI
vektra-learn/widget/src/api-client.js, .../chat-ui.js, .../index.js, .../styles.js
Added onNoRelevantContext callback and ChatUI.noRelevantContextMessage(); collapsible numbered sources UI, snippet truncation, i18n strings, and style adjustments.
Admin & Middleware
vektra-app/src/vektra_app/main.py, vektra-admin/src/vektra_admin/middleware.py, vektra-admin/src/vektra_admin/ui.py, vektra-admin/src/vektra_admin/templates/partials/audit_rows.html, vektra-admin/tests/*
Injected registry into qdrant startup check; set app.state.learn_require_enrollment; helper-tail verb derivation preserved using _HELPER_TAILS; IntegrityError handling narrowed to PG 23505; audit cursor uses isoformat; tests added/updated.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

Suggested labels

component:learn, bug, ci

🐰
I hopped through envs and bumped a little view,
Gave learners choices and IDs brand-new.
Sources fold and snippets trim with care,
Sparse vectors whisper answers in the air—
A tiny hop for code, v0.3.0 debut!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 51.92% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'release: v0.3.0' is directly related to the main change in the changeset: a version bump from 0.2.0 to 0.3.0 across all components, reflected in pyproject.toml files, version constants, CHANGELOG, and documentation updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

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 and usage tips.

@github-actions github-actions Bot added component:shared vektra-shared component component:core vektra-core component component:ingest vektra-ingest component component:index vektra-index component component:admin vektra-admin component infra Infrastructure, Docker, deployment labels Mar 21, 2026
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on stabilizing and improving the e-learning vertical and widget, addressing bugs, and updating configurations for better performance and usability. It prepares the e-learning vertical and widget for pilot deployment by completing Sprint 1 of the post-Phase 2 roadmap.

Highlights

  • E-learning Vertical Refinements: This release includes refinements to the e-learning vertical, enhancing LMS integrations and the chatbot widget.
  • Widget UX Improvements: The chatbot widget receives UX improvements such as collapsible source citations, enhanced accessibility, and i18n support.
  • Phase 2 Stabilization: Several fixes contribute to the stabilization of Phase 2 features, addressing bugs and technical debt.
  • Configuration Updates: Default configurations are updated, including a switch to Combo D RAG tuning, a new embedding model, and adjusted token reserve and fallback timeout values.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request prepares for the v0.3.0 release, incorporating a wide range of features, bug fixes, and documentation updates from sprint 1. Key changes include implementing optional enrollment for LMS integrations, adding sparse embedding generation to the ingest pipeline, and improving the chatbot widget's UX with collapsible sources. My review focuses on improving code maintainability. I've suggested refactoring duplicated validation logic in the ingest pipeline and extracting complex namespace resolution logic in the learn API into a helper function to improve readability, noting that the latter suggestion also reinforces the rule for explicit JWT claim validation. Overall, the changes are well-implemented and tested, reflecting a solid release.

Comment thread vektra-ingest/src/vektra_ingest/pipeline.py
Comment thread vektra-learn/src/vektra_learn/api.py
Main had commits from release/v0.2.0 (PR #38) that were not
back-merged into develop. All conflicts resolved keeping develop
versions (v0.3.0 > v0.2.0).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
fvadicamo and others added 7 commits March 21, 2026 18:26
The merge of main into develop auto-resolved safeguards/__init__.py
incorrectly, taking main's raise-ValueError approach over develop's
graceful-fallback approach (try/except with passthrough fallback).

Restores the develop behavior: unknown modes log a warning and fall
back to passthrough, presidio import failures fall back gracefully.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- scripts/ingest.sh: add .md content-type mapping (text/markdown)
- audit_rows.html: use isoformat() to preserve timezone in cursor
- qdrant.py: fix gRPC deadline check with "in" instead of exact match

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mirror the execute() recheck in _stream(): if post_retrieval
safeguard filtered all chunks, set no_relevant_context and return
early instead of calling LLM with empty context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- middleware.py: hoist _helper_segments to module-level _HELPER_TAILS
- test_rls.py: add conflicting body to GET query param precedence test
- qdrant.py: add debug log on race condition resolution
- ui.py: narrow IntegrityError to unique violation (pgcode 23505)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
POST /api-keys/revoke now produces "revoke_api-keys" instead of
"create_api-keys". The path tail (/create, /revoke, /delete, /update)
overrides the HTTP method verb when present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Version 1.10 (2026-03-01, OQ-018/OQ-019 resolution) was listed after
Version 2.0 (2026-03-14) due to merge order. Moved to correct position.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Sync main into develop (diverged history from v0.2.0 release)
- Restore safeguard graceful fallback lost in auto-merge
- Fix 3 critical bugs: ingest.sh .md mapping, audit cursor timezone, gRPC deadline check
- Add streaming post_retrieval recheck, audit verb from helper tail
- Hoist _HELPER_TAILS, narrow IntegrityError, qdrant race log, test improvements

Reviews: 12/12 addressed (CodeRabbit 11, Gemini 1)
Tests: 576 passed

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
vektra-core/src/vektra_core/safeguards/__init__.py (1)

27-43: Normalize safeguard mode before branching.

Current matching is exact; values like "Presidio" or " presidio " silently degrade to passthrough. Normalizing once makes config handling safer.

♻️ Suggested refactor
 def create_safeguard(mode: str, *, pii_chunk_threshold: int = 3) -> SafeguardHook:
@@
-    if mode == "presidio":
+    normalized_mode = mode.strip().lower()
+
+    if normalized_mode == "presidio":
         try:
             from vektra_core.safeguards.presidio import PresidioPIISafeguard

             return PresidioPIISafeguard(pii_chunk_threshold=pii_chunk_threshold)
@@
-    if mode != "passthrough":
+    if normalized_mode != "passthrough":
         log.warning("safeguard_unknown_mode", mode=mode, fallback="passthrough")
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@vektra-core/src/vektra_core/safeguards/__init__.py` around lines 27 - 43,
Normalize the incoming mode value before the branching logic by assigning a
cleaned version (e.g., mode = mode.strip().lower() if mode is a string) and then
use that normalized variable for the comparisons; update the checks that
currently compare mode == "presidio" and mode != "passthrough" to use the
normalized mode so inputs like "Presidio" or " presidio " correctly match and
still fall back to returning PassthroughSafeguard() and logging via log.warning
when appropriate, while leaving references to PresidioPIISafeguard and
PassthroughSafeguard unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/ingest.sh`:
- Line 65: The CLI help/usage text was not updated to reflect the new .md case
(you added the md) pattern that sets CONTENT_TYPE="text/markdown"); update the
script's help/usage output (the function or block that prints supported formats
/ examples) to include Markdown and .md alongside PDF, DOCX, PPTX so the usage
string matches the md) => CONTENT_TYPE="text/markdown" handling.

In `@vektra-learn/src/vektra_learn/service.py`:
- Around line 53-57: The TokenRequest model's namespace Field currently allows
empty strings; update the Field on namespace in TokenRequest to forbid empty
values by adding a minimum length constraint (e.g., min_length=1) or use a
constrained type (e.g., constr(min_length=1)) and optionally strip whitespace,
so that None is still allowed but "" (or only-whitespace) is rejected and will
not produce an empty JWT claim.

---

Nitpick comments:
In `@vektra-core/src/vektra_core/safeguards/__init__.py`:
- Around line 27-43: Normalize the incoming mode value before the branching
logic by assigning a cleaned version (e.g., mode = mode.strip().lower() if mode
is a string) and then use that normalized variable for the comparisons; update
the checks that currently compare mode == "presidio" and mode != "passthrough"
to use the normalized mode so inputs like "Presidio" or " presidio " correctly
match and still fall back to returning PassthroughSafeguard() and logging via
log.warning when appropriate, while leaving references to PresidioPIISafeguard
and PassthroughSafeguard unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5644fd6c-87a1-4be0-8cd3-ad54662eed2b

📥 Commits

Reviewing files that changed from the base of the PR and between 5a93a1a and d0a7c86.

⛔ Files ignored due to path filters (3)
  • .s2s/BACKLOG.md is excluded by !.s2s/**
  • .s2s/architecture.md is excluded by !.s2s/**
  • uv.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (46)
  • .env.example
  • .gitignore
  • CHANGELOG.md
  • CONTRIBUTING.md
  • GOVERNANCE.md
  • README.md
  • docker-compose.yml
  • docs/reference/configuration.md
  • docs/reference/error-codes.md
  • scripts/ingest.sh
  • vektra-admin/pyproject.toml
  • vektra-admin/src/vektra_admin/health.py
  • vektra-admin/src/vektra_admin/middleware.py
  • vektra-admin/src/vektra_admin/templates/partials/audit_rows.html
  • vektra-admin/src/vektra_admin/ui.py
  • vektra-admin/tests/test_health.py
  • vektra-admin/tests/test_rls.py
  • vektra-analytics/pyproject.toml
  • vektra-analytics/src/vektra_analytics/__init__.py
  • vektra-app/pyproject.toml
  • vektra-app/src/vektra_app/__init__.py
  • vektra-app/src/vektra_app/main.py
  • vektra-core/pyproject.toml
  • vektra-core/src/vektra_core/pipeline.py
  • vektra-core/src/vektra_core/providers/litellm_provider.py
  • vektra-core/src/vektra_core/safeguards/__init__.py
  • vektra-core/tests/test_safeguards.py
  • vektra-index/pyproject.toml
  • vektra-index/src/vektra_index/providers/qdrant.py
  • vektra-ingest/pyproject.toml
  • vektra-ingest/src/vektra_ingest/pipeline.py
  • vektra-ingest/tests/test_pipeline.py
  • vektra-ingest/tests/test_versioning.py
  • vektra-learn/pyproject.toml
  • vektra-learn/src/vektra_learn/api.py
  • vektra-learn/src/vektra_learn/service.py
  • vektra-learn/tests/test_api.py
  • vektra-learn/tests/test_service.py
  • vektra-learn/widget/src/api-client.js
  • vektra-learn/widget/src/chat-ui.js
  • vektra-learn/widget/src/index.js
  • vektra-learn/widget/src/styles.js
  • vektra-shared/pyproject.toml
  • vektra-shared/src/vektra_shared/__init__.py
  • vektra-shared/src/vektra_shared/config.py
  • vektra-shared/tests/test_config.py

Comment thread scripts/ingest.sh Outdated
Comment thread vektra-learn/src/vektra_learn/service.py
- service.py: disallow empty namespace in TokenRequest (min_length=1)
- ingest.sh: update help text to include MD format
- safeguards: normalize mode with strip().lower() before matching

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fvadicamo

Copy link
Copy Markdown
Contributor Author

Fixed in PR #46: normalized safeguard mode with strip().lower() (CodeRabbit nitpick on safeguards/init.py:27-43).

@fvadicamo fvadicamo self-assigned this Mar 22, 2026
fvadicamo and others added 2 commits March 22, 2026 11:44
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Disallow empty namespace in TokenRequest (min_length=1)
- Update ingest.sh help text and add .markdown extension support
- Normalize safeguard mode with strip().lower()

Reviews: 2/2 addressed (CodeRabbit 1, Gemini 1)
Tests: 576 passed
Refs: PR #44 review comments

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vektra-learn/src/vektra_learn/service.py`:
- Around line 168-175: The audit event "dashboard_token_generated" currently
omits the effective namespace even when a scoped token is created; update the
code that builds and emits the audit event (the same area that constructs
payload and uses req.namespace) to include the JSON field "namespace" with the
value from req.namespace when present so the emitted event carries the
business-facing "namespace" key for traceability; ensure you modify the event
emission logic that references payload/dashboard_token_generated so the audit
payload matches the token payload's namespace.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9ecc5f1a-6706-4746-b913-01029fe82ed5

📥 Commits

Reviewing files that changed from the base of the PR and between d0a7c86 and a36b191.

📒 Files selected for processing (3)
  • scripts/ingest.sh
  • vektra-core/src/vektra_core/safeguards/__init__.py
  • vektra-learn/src/vektra_learn/service.py
✅ Files skipped from review due to trivial changes (1)
  • scripts/ingest.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • vektra-core/src/vektra_core/safeguards/init.py

Comment thread vektra-learn/src/vektra_learn/service.py
Add effective namespace (req.namespace or course_id fallback) to the
dashboard_token_generated audit log for scoped access traceability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add effective namespace to dashboard_token_generated audit event

Reviews: 1/1 addressed (Gemini: DashboardTokenOrm column deferred)
Tests: 576 passed
Refs: PR #44 review comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:admin vektra-admin component component:core vektra-core component component:index vektra-index component component:ingest vektra-ingest component component:shared vektra-shared component documentation Improvements or additions to documentation enhancement New feature or request infra Infrastructure, Docker, deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants