Skip to content

UN-3636 [MISC] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS#2188

Open
chandrasekharan-zipstack wants to merge 2 commits into
mainfrom
feat/rig-extra-manifests
Open

UN-3636 [MISC] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS#2188
chandrasekharan-zipstack wants to merge 2 commits into
mainfrom
feat/rig-extra-manifests

Conversation

@chandrasekharan-zipstack

Copy link
Copy Markdown
Contributor

What

load_groups() now merges extra group manifests listed in the UNSTRACT_RIG_EXTRA_MANIFESTS env var (os.pathsep-separated, REPO_ROOT-relative) onto the base tests/groups.yaml before validation — so cross-manifest depends_on and the platform-gate invariant are checked over the union. Group-name collisions are an error, not a silent override.

Why

Lets a downstream repo contribute its own test groups without editing the OSS manifest. First consumer is the cloud build: it copies a tests/groups.cloud.yaml into the merged tree (via copy_cloud_deps.py) and points the env var at it, so cloud-only plugin test groups (workers, etc.) join the rig without forking groups.yaml. No cloud specifics leak into OSS.

Changes

  • tests/rig/groups.py: _extra_manifest_paths() + _merge_manifest(), wired into load_groups().
  • tests/rig/tests/test_groups.py: +2 self-tests (successful merge with cross-manifest depends_on; name-collision rejected).

Notes

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

Walkthrough

Group loading now supports environment-specified overlay manifests, merges and validates their groups, and rejects duplicate names. Organization lookup now returns None without querying the database when no organization identifier is present.

Changes

Manifest overlay loading

Layer / File(s) Summary
Overlay parsing and merged validation
tests/rig/groups.py
Resolves overlay paths from UNSTRACT_RIG_EXTRA_MANIFESTS, merges defaults and groups, rejects name collisions, and validates the combined graph.
Overlay behavior coverage
tests/rig/tests/test_groups.py
Tests cross-manifest dependency expansion and duplicate group-name rejection.

Organization context lookup

Layer / File(s) Summary
Missing organization guard
backend/utils/user_context.py, backend/utils/tests/test_user_context.py
Returns None for missing or empty organization context and verifies that no database lookup occurs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers What, Why, and Changes, but omits several required template sections, especially the mandatory breakage impact section. Add the missing template sections, especially How, breakage impact, database migrations, env config, testing notes, related issues, and checklist.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is specific and matches the main change: merging overlay manifests from UNSTRACT_RIG_EXTRA_MANIFESTS.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/rig-extra-manifests

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.

Base automatically changed from feat/un-3636-execute-path-llm-mock to main July 21, 2026 09:38
load_groups() now merges extra group manifests listed in the env var
(os.pathsep-separated, REPO_ROOT-relative) onto the base tests/groups.yaml
before validation, so cross-manifest depends_on and the platform-gate
invariant are checked over the union. Name collisions are an error.

Lets a downstream repo (the cloud build) contribute its own test groups by
copying a groups.cloud.yaml into the merged tree, without editing the OSS
manifest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RnLaN45ShBbcCXWZkqCThz
@chandrasekharan-zipstack
chandrasekharan-zipstack marked this pull request as ready for review July 21, 2026 11:28
@greptile-apps

greptile-apps Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR lets the test rig merge extra group manifests and adds a safer no-context organization lookup.

  • Adds UNSTRACT_RIG_EXTRA_MANIFESTS support for overlay group manifests.
  • Merges overlay groups before dependency, cycle, path, and platform-gate validation.
  • Rejects duplicate group names across manifests.
  • Returns None from UserContext.get_organization() when no organization identifier is present.
  • Adds tests for manifest merging, collisions, and no-context organization lookup.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
tests/rig/groups.py Adds environment-driven overlay manifest loading and in-place merge before rig validation.
tests/rig/tests/test_groups.py Adds tests for overlay manifest merging and duplicate group rejection.
backend/utils/user_context.py Skips the organization query when the context has no organization identifier.
backend/utils/tests/test_user_context.py Adds tests for no-context organization lookup behavior.

Reviews (4): Last reviewed commit: "UN-3636 [FIX] Skip org lookup when no or..." | Re-trigger Greptile

Comment thread tests/rig/groups.py
@chandrasekharan-zipstack chandrasekharan-zipstack changed the title UN-3636 [FEAT] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS UN-3636 [MISC] Merge overlay manifests via UNSTRACT_RIG_EXTRA_MANIFESTS Jul 21, 2026
UserContext.get_organization() ran Organization.objects.get() even with no
org id in StateStore (import time, or management commands with no request),
catching only DoesNotExist/ProgrammingError — a DB-less/unmigrated setup hit
an uncaught OperationalError. Short-circuit when there's no org id: no query,
so serializers/managers that reference org-scoped querysets at class-def can
be imported during DB-free test collection.
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Unstract test results

Per-group results

Status Group Tier Passed Failed Errors Skipped Duration (s)
e2e-api-deployment e2e 3 0 0 0 20.7
e2e-coowners e2e 1 0 0 0 1.6
e2e-etl e2e 1 0 0 0 8.3
e2e-login e2e 2 0 0 0 1.2
e2e-prompt-studio e2e 1 0 0 0 4.6
e2e-smoke e2e 2 0 0 0 1.3
e2e-workflow e2e 1 0 0 0 16.2
integration-backend integration 124 0 0 27 68.6
integration-connectors integration 1 0 0 7 8.3
unit-backend unit 162 0 0 0 22.4
unit-connectors unit 63 0 0 0 10.0
unit-core unit 27 0 0 0 1.3
unit-platform-service unit 15 0 0 0 2.6
unit-rig unit 78 0 0 0 4.5
unit-sdk1 unit 490 0 0 0 25.7
unit-workers unit 723 0 0 0 46.9
TOTAL 1694 0 0 34 244.1

Critical paths

⚠️ Critical paths not yet covered

  • workflow-execution-fan-out — Multi-file workflow execution fans out to file-processing workers and rejoins. (declared coverage: no groups declared)
✅ Covered critical paths
  • auth-login — covered by e2e-login
  • adapter-register-llm — covered by integration-backend
  • workflow-author — covered by integration-backend
  • co-owner-manage — covered by integration-backend, e2e-coowners
  • workflow-create-execute — covered by e2e-workflow
  • api-deployment-provision — covered by integration-backend
  • api-deployment-auth — covered by integration-backend
  • api-deployment-run — covered by e2e-api-deployment
  • prompt-studio-author — covered by integration-backend
  • prompt-studio-fetch-response — covered by e2e-prompt-studio
  • connector-register-test — covered by integration-backend
  • pipeline-etl-execute — covered by e2e-etl
  • usage-aggregate-read — covered by integration-backend
  • usage-token-tracking — covered by e2e-api-deployment
  • callback-result-delivery — covered by e2e-api-deployment

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