Skip to content

UN-3396 [MISC] Introduce design-rules system with prototype per-component files#1908

Open
muhammad-ali-e wants to merge 9 commits intomainfrom
misc/UN-3396-MISC_design_rules_prototype
Open

UN-3396 [MISC] Introduce design-rules system with prototype per-component files#1908
muhammad-ali-e wants to merge 9 commits intomainfrom
misc/UN-3396-MISC_design_rules_prototype

Conversation

@muhammad-ali-e
Copy link
Copy Markdown
Contributor

What

  • Introduce a file-based, version-controlled design-rules system at design-rules/ containing universal principles (P1–P9), an AI review checklist, a per-component contract that defines the canonical shape of per-component DESIGN_RULES.md files, a definition of done, a change lifecycle, security standards (Three-Layer Defense, SQL Safety Standard S1), and 8 accepted ADRs.
  • Add the design-rules Claude skill at .claude/skills/design-rules/ (un-ignored from .gitignore in this PR) exposing list, get, add, update, review, and validate operations over the ruleset, with a validate.sh script that enforces the canonical shape.
  • Add 5 prototype per-component DESIGN_RULES.md files in the canonical shape, each chosen to exercise a different dimension of the contract:
    • backend/account_v2/ — tenant-graph root.
    • backend/workflow_manager/ — anchor entity (P9) with execution-side children. R3 encodes audit-durability of on_delete for Workflow-rooted FKs (motivated by the recent dashboard regression where workflow deletion cascaded through WorkflowExecutionExecutionLog and broke recent-activity).
    • unstract/connectors/ — parent shared library; R5 delegates SQL rules to its child databases file.
    • unstract/connectors/src/unstract/connectors/databases/ — deeply-nested component (6 ../ hops to the contract); specialises Security Standard S1 into R1–R6 for every supported DB engine.
    • workers/shared/ — worker context (no Django imports, no thread-local org); R5 encodes the UNS-205 HTTP session lifecycle with a real test path.
  • Fix a bug in validate.sh where the Compatibility-blockquote grep pattern was looking for the literal substring Compatibility: All which never matched the contract's bold form **Compatibility:** All. The pattern is now All changes to this component must remain compatible, which matches both forms. per-component-contract.md is updated to reflect the new pattern.

Why

  • Design decisions, security constraints, and known anti-patterns currently live in scattered places — Slack threads, Confluence pages, individual reviewer memory, one-off PR comments. AI coding assistants and human reviewers cannot consult them deterministically, so the same mistakes get re-discovered every PR (most recently the workflow-deletion / execution-log cascade incident).
  • This PR introduces a versioned ruleset that lives in the repo and follows the AGENTS.md nested-discovery convention: an AI agent or reviewer touching any file loads DESIGN_RULES.md from the file's directory plus every parent up to the repo root, and gets a deterministic list of applicable rules.
  • The 5 per-component files are deliberately a prototype. The canonical shape gets debated once, on a representative sample, before UN-3397 converts the remaining ~36 files in a follow-up coverage-sweep PR.

How

  • design-rules/ is added as a new top-level directory following the AGENTS.md convention.
  • The per-component contract (design-rules/per-component-contract.md) is the canonical schema: every per-component file follows a fixed Scope / Read first / Rules / Known Exceptions / Checklist structure, with a 4-row Severity / Why / Refs / Enforced by table per rule, ~70-line target, 5–7 rules per component (hard ceiling 10).
  • Three meta-rules govern the system: M1 (every active component has a file), M2 (rules and code co-change in the same PR), M3 (no rule contradicts another).
  • The 5 prototype files are the smallest set that exercises every dimension the contract has to handle: tenant root, anchor entity with cascade rule, parent/child library layering, deeply-nested relative paths, security-standard specialisation, and worker no-Django context.
  • Cross-file consistency (M3) is preserved: workflow_manager.R5 and workers/shared.R4 both require JSON-only Celery serialization; connectors.R5 delegates to databases.R1–R6.
  • The Enforced by field of every rule is honest — rules that have no automated check today say code review only or not yet enforced — <reason>. No aspirational enforcement claims.

Can this PR break any existing features. If yes, please list possible items. If no, please explain why.

No. This PR adds documentation files (and one Claude skill) only. No code paths, models, migrations, settings, runtime behaviour, or CI configuration are touched. The files are read by AI agents and human reviewers; nothing in production loads them. The only behavioural change is that validate.sh now correctly validates the canonical Compatibility blockquote — it was previously a no-op for any file using the bold form, which is every file in this PR.

Database Migrations

None.

Env Config

None.

Relevant Docs

  • AGENTS.md — the nested-discovery convention this system follows.

Related Issues or PRs

  • Parent: UN-3395 — Introduce versioned design-rules system (prototype + bulk rollout)
  • This PR: UN-3396 — Design-rules prototype
  • Follow-up: UN-3397 — Bulk conversion of remaining ~36 per-component files (blocked by this PR)

Dependencies Versions

None.

Notes on Testing

This PR is documentation + a shell-script validator. Validation is done via the bundled design-rules Claude skill's validate.sh script:

bash .claude/skills/design-rules/scripts/validate.sh

The script checks three things: a forbidden-word scan (cloud, enterprise, hitl, subscription, agentic, vendor names, etc.), the verbatim Compatibility blockquote on every per-component file, and a directory-sanity check that each component dir contains real source. All three checks pass against this PR's files.

Reviewers can spot-check by:

  • Reading any one of the 5 prototype files end-to-end (each is ~70–110 lines and self-contained).
  • Verifying that the relative path from each file resolves to design-rules/per-component-contract.md (the deeply-nested databases/ file uses 6 ../ hops; the others use 2).
  • Cross-checking M3 consistency: workflow_manager.R5workers/shared.R4 both require JSON-only Celery serialization; connectors.R5 delegates to databases.R1–R6.

Checklist

  • I have added an appropriate PR title and description
  • I have read and understood the Contribution Guidelines
  • My code follows the style guidelines of this project
  • I have solved all the sonar issues
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works (N/A — docs + skill, validator is itself the test)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

🤖 Generated with Claude Code

…nent files

Introduce a file-based, version-controlled design-rules system at design-rules/
following the AGENTS.md nested-discovery convention, plus 5 prototype
per-component DESIGN_RULES.md files in the canonical shape defined by
design-rules/per-component-contract.md, plus the design-rules Claude skill
that exposes list/get/add/update/review/validate operations over the ruleset.

The 5 prototype files each exercise a different dimension of the contract:
account_v2 (tenant-graph root), workflow_manager (anchor entity with
audit-durable on_delete rule), connectors (parent shared library),
connectors/databases (deeply-nested component specialising SQL Safety
Standard S1), and workers/shared (worker no-Django context with the UNS-205
HTTP session lifecycle rule).

Also fixes a bug in the skill validator where the Compatibility-blockquote
grep pattern was looking for "Compatibility: All" which never matched the
contract's bold form "**Compatibility:** All".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Summary by CodeRabbit

  • Chores
    • Established internal design governance framework with architectural principles, decision records, and component-level design rules to ensure consistent, secure, and maintainable code quality across the repository.

Walkthrough

Adds a repository-wide design-rules system: global rule documents under design-rules/, per-component DESIGN_RULES.md files, multiple ADRs and security standards, a Claude Code skill spec, and an executable repo-root validation script.

Changes

Cohort / File(s) Summary
Skill & Tooling
.claude/skills/design-rules/SKILL.md, .claude/skills/design-rules/scripts/validate.sh, .gitignore
Adds a Claude Code skill spec for managing design rules, an executable validate.sh that performs forbidden-term, compatibility-sentence, and component-source checks, and updates .gitignore so the skill directory is tracked.
Global Design Framework
design-rules/README.md, design-rules/principles.md, design-rules/ai-review-checklist.md, design-rules/definition-of-done.md, design-rules/lifecycle.md, design-rules/per-component-contract.md
Introduces the global rule framework: README, nine principles, AI review checklist, Definition of Done, lifecycle/process guidance, and a canonical per-component contract (required sections, rule format, numbering, and meta-rules).
ADRs
design-rules/adr/README.md, design-rules/adr/ADR-001-*.md, design-rules/adr/ADR-002-*.md, design-rules/adr/ADR-003-*.md, design-rules/adr/ADR-005-*.md, design-rules/adr/ADR-006-*.md, design-rules/adr/ADR-007-*.md, design-rules/adr/ADR-012-*.md, design-rules/adr/ADR-014-*.md
Adds ADR index and multiple ADRs covering org-scoping (query-layer), no org FK on execution, usage string refs, Prompt Studio publish gate, org rate-limit separation, runtime adapter validation, ConnectorAuth ownership, internal/external API separation, and ADR maintenance rules.
Security & Tenant Isolation
design-rules/security/standards.md, design-rules/security/tenant-isolation.md
Adds security standards including S1 — SQL Safety Standard for database connectors and a three-layer tenant isolation model (CustomAuthMiddleware, model managers/OrgAwareManager, OrganizationFilterBackend).
Component-Level Rules
backend/account_v2/DESIGN_RULES.md, backend/workflow_manager/DESIGN_RULES.md, unstract/connectors/DESIGN_RULES.md, unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md, workers/shared/DESIGN_RULES.md
Adds per-component DESIGN_RULES.md files defining scope, mandatory rules (MUST/SHOULD), enforcement pointers, read-first references, and checklist links for account_v2, workflow_manager, connector framework, database connectors, and workers/shared.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: introducing a design-rules system with five prototype per-component files following a specific contract structure.
Description check ✅ Passed The PR description is comprehensive and well-structured, covering all template sections: What (design-rules system contents), Why (centralized decision documentation), How (contract structure and meta-rules), breaking changes (none), migrations/config (none), testing (validation script), and related issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch misc/UN-3396-MISC_design_rules_prototype

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.

muhammad-ali-e and others added 2 commits April 8, 2026 15:54
SonarQube flagged 4 single-bracket conditional tests on lines 42, 51, 56,
and 59 of .claude/skills/design-rules/scripts/validate.sh. Switched to the
[[ ]] form, which is the bash convention SonarQube enforces.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 8, 2026

Greptile Summary

This PR introduces a version-controlled, file-based design-rules system for the Unstract repository — a layered ruleset in design-rules/ (9 universal principles P1–P9, 8 accepted ADRs, security standards, AI review checklist, per-component contract, and lifecycle docs) together with 5 prototype per-component DESIGN_RULES.md files, a design-rules Claude skill, and a portable validate.sh script. No runtime code is touched; the change is purely documentation infrastructure plus a shell validator.

Key highlights:

  • The 5 prototype files exercise every dimension of the per-component contract: tenant-graph root (account_v2), anchor entity with cascade rule (workflow_manager), parent/child library layering (connectorsdatabases/), deeply-nested paths (6 ../ hops), and worker no-Django context (workers/shared).
  • All three issues caught in previous review rounds are resolved: the validate.sh per-check failure flags prevent silent "no OK / no FAIL" output; the mapfile call has been replaced with a bash 3.2-compatible while read loop; and the SKILL.md review-trap table now correctly maps "Missing auth" to P5 (fail-closed) instead of the unrelated P8.
  • workers/shared/DESIGN_RULES.md R3's Enforced by is now the conformant code review only value.
  • M3 cross-consistency is maintained: workflow_manager.R5 and workers/shared.R4 both mandate JSON-only Celery serialization; connectors.R5 correctly delegates SQL rules to databases/R1–R6.
  • One remaining minor issue: workers/shared/DESIGN_RULES.md R3's Refs row cites `CLAUDE.md` (architecture principles), which falls outside the canonical design-rules reference vocabulary (principles.md#PN, adr/ADR-NNN, security/...). The skill's get command only assembles bundles from files inside the design-rules/ hierarchy, so CLAUDE.md is a dead end for automated rule traversal. A follow-up ADR or a plain principles.md#P6 · principles.md#P8 reference would be cleaner."

Confidence Score: 5/5

Safe to merge — documentation-only PR with no runtime changes; all previous P0/P1 concerns are resolved.

All three P1-level issues from prior review rounds (validate.sh output ambiguity, bash portability, wrong principle reference in SKILL.md) are fully resolved. The single remaining finding (non-standard CLAUDE.md Ref in workers/shared R3) is a P2 stylistic inconsistency that does not block correctness or merge safety. No runtime code is changed.

workers/shared/DESIGN_RULES.md — minor non-standard Refs value in R3 worth tidying before the bulk UN-3397 rollout.

Vulnerabilities

No security concerns identified. This PR is documentation-only (plus a shell validator). The security standards it documents (EncryptedBinaryField, Three-Layer Defense, S1 SQL Safety Standard, InternalAPIAuthMiddleware, Celery JSON serialization) are descriptions of existing implemented protections, not new code paths. The validate.sh script performs only read-only filesystem operations (find, grep) and exits with 0/1; it introduces no new attack surface.

Important Files Changed

Filename Overview
.claude/skills/design-rules/scripts/validate.sh All three issues flagged in previous review rounds have been addressed: per-check failure flags prevent ambiguous output, mapfile replaced with portable while-loop, and Compatibility grep pattern updated. Script is clean and passes its own checks.
.claude/skills/design-rules/SKILL.md Previously incorrect P8 trap reference in the review command table has been corrected to P5 (fail-closed). The skill's command set, path reference table, and review traps are all consistent with the global design-rules files.
workers/shared/DESIGN_RULES.md R3's previously non-conforming Enforced by value is now code review only, which is correct. Minor remaining issue: R3 Refs cites CLAUDE.md which falls outside the canonical design-rules reference vocabulary.
backend/account_v2/DESIGN_RULES.md Canonical prototype file; correctly follows per-component-contract structure (title, intro, Compatibility blockquote, contract pointer, Scope, Read first, Rules, Checklist). All four rule fields populated and relative paths resolve correctly.
backend/workflow_manager/DESIGN_RULES.md Anchor-entity prototype file. R3 (audit-durable on_delete) correctly encodes the cascade regression motivating this PR. R5 (JSON-only Celery) is M3-consistent with workers/shared R4. All section structure and rule tables conform to contract.
unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md Deep-nested component (6 ../ hops verified). Correctly specialises S1 into R1–R6 for all 8 DB engines. Parent connector framework and global security/standards.md cross-linked appropriately. All rule tables complete.
unstract/connectors/DESIGN_RULES.md Parent library prototype; R5 correctly delegates SQL rules to the databases/ subtree DESIGN_RULES.md. Contract pointer path resolves correctly. Relative link to databases/ DESIGN_RULES.md verified accurate.
design-rules/per-component-contract.md Updated to reflect the new Compatibility blockquote grep pattern (All changes to this component must remain compatible). Self-update reminder section is present and complete. Contract is internally consistent with all five prototype files.
design-rules/principles.md New file; defines P1–P9 with Rule / Implementation / Example rows. P5 (fail-closed) and P8 (internal/external separation) are clearly distinguished, resolving the previous P8-vs-P5 confusion in the skill.
.gitignore Correctly un-ignores .claude/skills/design-rules/ and its contents while keeping other .claude/ directories ignored. The .sh global ignore is overridden by the subsequent !.claude/skills/design-rules/* negation, so validate.sh will be tracked.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["AI Agent / PR Reviewer\ntouches a file"] --> B["Walk up to repo root\ncollecting DESIGN_RULES.md"]
    B --> C{"DESIGN_RULES.md\nfound?"}
    C -- "Yes" --> D["Load per-component rules\n(Scope · Read first · R1..Rn)"]
    C -- "No" --> E["Only global rules apply"]
    D --> F["Load referenced global files"]
    E --> F
    F --> G["design-rules/principles.md\nP1–P9"]
    F --> H["design-rules/ai-review-checklist.md\n9 questions"]
    F --> I["design-rules/adr/ADR-NNN.md\n8 accepted ADRs"]
    F --> J["design-rules/security/*.md\nTenant isolation · SQL S1"]
    G & H & I & J --> K["Deduplicated rule bundle"]
    K --> L["Review code changes\nagainst rules"]
    L --> M{"Violations\nfound?"}
    M -- "Yes" --> N["Flag per: file · line\nprinciple/ADR · fix"]
    M -- "No" --> O["Proceed to merge"]
    P["validate.sh"] --> Q["1. Forbidden-word scan\n(cloud, enterprise, HITL, …)"]
    P --> R["2. Compatibility blockquote\npresent in every file?"]
    P --> S["3. Component dir\ncontains real source?"]
    Q & R & S --> T{"All pass?"}
    T -- "Yes" --> U["exit 0"]
    T -- "No" --> V["exit 1 — list failures"]
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: workers/shared/DESIGN_RULES.md
Line: 55

Comment:
**Non-standard `Refs` target: `CLAUDE.md` is outside the design-rules system**

R3's `Refs` row cites `` `CLAUDE.md` (architecture principles) ``, but the per-component contract establishes a canonical Refs vocabulary of `principles.md#PN`, `adr/ADR-NNN`, and `security/...`. `CLAUDE.md` is an AI-assistant instructions file that sits outside the `design-rules/` hierarchy and is not surfaced by the skill's `get` command when collecting applicable rules.

The "no-Django in workers" constraint is arguably already covered by `principles.md#P6` (execution inherits org from parent entity, not from Django thread-locals), but since that principle doesn't explicitly name the import boundary, a cleaner option is to add a dedicated ADR (e.g. `ADR-015-no-django-in-workers.md`) and reference it here:

```suggestion
| **Refs** | `principles.md#P6` · `principles.md#P8` |
```

Or, once the ADR exists:
```
| **Refs** | `principles.md#P6` · `adr/ADR-015` |
```

Using `CLAUDE.md` as a Ref value means a reviewer/AI agent following the `get` path will find a broken chain — the skill's `get` command only assembles rule bundles from files inside `design-rules/` and the nested `DESIGN_RULES.md` hierarchy.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (5): Last reviewed commit: "Merge branch 'main' into misc/UN-3396-MI..." | Re-trigger Greptile

…rmat

The "How to add an ADR" table in design-rules/README.md still mentioned
the old "format: Status / Context / Decision / Consequences" and
"status Accepted" guidance, which contradicts the same PR's own
adr/README.md (Status field dropped; merge is the acceptance) and the
8 ADR files themselves.

Collapse the duplicate guidance into a one-line pointer to adr/README.md
so the ADR mechanics have a single source of truth and cannot drift
again. Also add per-component-contract.md and definition-of-done.md to
the Layout table — both are core files in the corpus and were missing
from the navigation. Rename the adr/ Layout row from "Accepted" to
"Active" to match the new vocabulary.

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🧹 Nitpick comments (3)
workers/shared/DESIGN_RULES.md (1)

31-38: Consider clarifying R1 scope for external service calls.

R1's title "All backend traffic goes through InternalAPIClient" could be more precise. The "Why" field correctly specifies "worker-to-backend call," but the title might be misread as covering all HTTP traffic from workers (including external services like x2text-service/runner endpoints).

Consider rephrasing the title to: "All worker-to-backend calls go through InternalAPIClient" or adding a parenthetical note excluding external service calls.

📝 Optional clarification
-### R1 — All backend traffic goes through `InternalAPIClient`
+### R1 — All worker-to-backend calls go through `InternalAPIClient`

Or alternatively, add a clarifying note in the "Why" field:

 | **Why** | Every worker-to-backend call must use `InternalAPIClient` (or one of its sub-clients under `workers/shared/clients/`). Ad-hoc `requests.get(...)` against public REST endpoints bypasses the internal auth boundary, the shared session pool, and retry/backoff policy, and makes worker behaviour depend on end-user auth middleware. |
+| | (External service calls—e.g., to x2text-service or other non-backend runners—may use plain `requests` as they are not subject to internal auth requirements.) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@workers/shared/DESIGN_RULES.md` around lines 31 - 38, Update R1's heading
and/or Why to clarify scope: change the title "All backend traffic goes through
`InternalAPIClient`" to "All worker-to-backend calls go through
`InternalAPIClient`" (or add a parenthetical like "(excludes external services
such as x2text-service/runner endpoints)"), and/or append a short sentence in
the "Why" field explicitly excluding external service calls; reference R1 and
InternalAPIClient so reviewers immediately see the intended scope.
.claude/skills/design-rules/scripts/validate.sh (1)

42-42: Per-check "OK" message uses cumulative failure flag.

The OK message at line 42 (and similarly at line 56) uses the global fail variable, which accumulates failures across all checks. If check 1 fails, check 2 won't print "OK" even if it passes. This is minor but could confuse users about which specific check passed/failed.

♻️ Suggested fix: track per-check status
 echo
 echo "==> 2. Compatibility statement presence"
 COMPAT='All changes to this component must remain compatible'
+check2_ok=1
 for f in "${COMPONENT_FILES[@]}"; do
   if ! grep -q "$COMPAT" "$f"; then
     echo "    MISSING: $f"
     fail=1
+    check2_ok=0
   fi
 done
-[[ $fail -eq 0 ]] && echo "    OK"
+[[ $check2_ok -eq 1 ]] && echo "    OK"

Apply similar pattern for check 3.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/design-rules/scripts/validate.sh at line 42, The current "OK"
echo uses the global fail variable so earlier failures suppress later per-check
"OK" messages; update each check to use a per-check status flag (e.g.,
check_fail or fail_check) that you initialize to 0 before the check, set to 1 on
that check's errors, and then replace occurrences of [[ $fail -eq 0 ]] && echo "
OK" with [[ $check_fail -eq 0 ]] && echo "    OK"; ensure the global fail still
accumulates by OR-ing it with the per-check flag (fail=$(( fail | check_fail )))
so overall failure behavior is unchanged but per-check success messages are
accurate.
.claude/skills/design-rules/SKILL.md (1)

182-187: Optional: vary repeated “Never ...” bullets for readability.

This is stylistic only, but rewording one or two bullets would address the repeated sentence-beginning warning and improve scanability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/design-rules/SKILL.md around lines 182 - 187, The list in
SKILL.md contains several consecutive bullets that all start with "Never ...",
reducing scanability; reword one or two of those bullets to vary sentence
openings while preserving meaning—e.g., change a bullet like "Never document a
proposed / unimplemented design as if it were a rule." to "Do not document
proposed or unimplemented designs as rules." and change "Never name a specific
PR review tool inside any rule file." to "Avoid naming specific PR review tools
in rule files." Update the corresponding bullets in the block shown so the
intent remains identical but the phrasing varies for readability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/design-rules/SKILL.md:
- Line 10: Update the SKILL.md wording to avoid overstating rollout scope and
remove hard-coded component counts: replace the phrase that claims full-repo
coverage like "each active Django app, each `unstract/` shared lib component,
and each worker" with softer language such as "per-component DESIGN_RULES.md
files (where applicable) in Django apps, shared libs, and workers" and remove
any explicit counts like "× 22", "× 9", "× 10"; instead use nondeterministic
language like "various components" or "examples include..." and note that
rollout is prototype-first and may expand, ensuring the same changes are applied
to the repeated instances around lines referenced (the sentence containing "each
active ..." and the nearby repeats at 202-204).
- Around line 103-117: The fenced ADR template block in SKILL.md uses an untyped
triple-backtick (```), triggering markdownlint MD040; update the fence to
include the language tag by changing the opening fence from ``` to ```md for the
ADR template block (the block starting with the ADR header "# ADR-NNN: <title>"
and ending with the closing ```), so the fenced code is explicitly marked as
Markdown.

In `@backend/workflow_manager/DESIGN_RULES.md`:
- Around line 40-47: ExecutionViewSet overrides filter_backends with
[DjangoFilterBackend, OrderingFilter], which bypasses the global org scoping
enforced by OrganizationFilterBackend and violates R2; fix by adding
OrganizationFilterBackend to ExecutionViewSet.filter_backends (or revert to
using DEFAULT_FILTER_BACKENDS) so all queryset reads go through org scoping, or
if this is intentional, document the exception and justification in
DESIGN_RULES.md under Known Exceptions referencing ExecutionViewSet and the
omitted OrganizationFilterBackend.

In `@design-rules/adr/ADR-006-organization-rate-limit-separation.md`:
- Line 9: The ADR incorrectly states that OrganizationRateLimit lives in the
configuration app; in reality the OrganizationRateLimit model is implemented in
the api_v2 app (models.py) rather than as a Configuration row, so either move
the OrganizationRateLimit model into the configuration app and make it a
Configuration row, or update ADR-006-organization-rate-limit-separation.md to
state that OrganizationRateLimit is a separate model implemented in the api_v2
app (not persisted as a Configuration row) and describe the current
storage/ownership decision; reference the OrganizationRateLimit and
Configuration symbols when editing so the doc matches the code.

In `@design-rules/README.md`:
- Around line 52-54: Remove the conflicting "Status" requirement from the
top-level ADR guidance by changing the item that lists "Status / Context /
Decision / Consequences" to match the ADR contract (i.e., "Context / Decision /
Consequences"), or alternatively update the ADR contract to explicitly include a
Status field—ensure the wording for the ADR structure in the README that
currently mentions "Status" is reconciled with the ADR contract in adr/README.md
so both documents present the same required fields (search for the literal
"Status" string in the ADR guidance and the ADR contract to update the one that
should be authoritative).

In `@design-rules/security/tenant-isolation.md`:
- Around line 11-13: Update the documentation to reflect that
CustomAuthMiddleware does not universally "fail closed": state that it only
rejects when request.organization_id is present and resolution fails (per
CustomAuthMiddleware behavior) and otherwise stores None in StateStore and
allows the request; also clarify that OrgAwareManager and
OrganizationFilterBackend provide additional defense-in-depth (with
OrganizationFilterBackend as the primary fail-closed boundary) so the doc
accurately describes the conditional middleware enforcement and the layered
relationship between CustomAuthMiddleware, OrgAwareManager, and
OrganizationFilterBackend.

---

Nitpick comments:
In @.claude/skills/design-rules/scripts/validate.sh:
- Line 42: The current "OK" echo uses the global fail variable so earlier
failures suppress later per-check "OK" messages; update each check to use a
per-check status flag (e.g., check_fail or fail_check) that you initialize to 0
before the check, set to 1 on that check's errors, and then replace occurrences
of [[ $fail -eq 0 ]] && echo "    OK" with [[ $check_fail -eq 0 ]] && echo "   
OK"; ensure the global fail still accumulates by OR-ing it with the per-check
flag (fail=$(( fail | check_fail ))) so overall failure behavior is unchanged
but per-check success messages are accurate.

In @.claude/skills/design-rules/SKILL.md:
- Around line 182-187: The list in SKILL.md contains several consecutive bullets
that all start with "Never ...", reducing scanability; reword one or two of
those bullets to vary sentence openings while preserving meaning—e.g., change a
bullet like "Never document a proposed / unimplemented design as if it were a
rule." to "Do not document proposed or unimplemented designs as rules." and
change "Never name a specific PR review tool inside any rule file." to "Avoid
naming specific PR review tools in rule files." Update the corresponding bullets
in the block shown so the intent remains identical but the phrasing varies for
readability.

In `@workers/shared/DESIGN_RULES.md`:
- Around line 31-38: Update R1's heading and/or Why to clarify scope: change the
title "All backend traffic goes through `InternalAPIClient`" to "All
worker-to-backend calls go through `InternalAPIClient`" (or add a parenthetical
like "(excludes external services such as x2text-service/runner endpoints)"),
and/or append a short sentence in the "Why" field explicitly excluding external
service calls; reference R1 and InternalAPIClient so reviewers immediately see
the intended scope.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b24e34e1-9d1f-47c2-bb88-166029af3735

📥 Commits

Reviewing files that changed from the base of the PR and between c9ffd9d and ef544fc.

📒 Files selected for processing (25)
  • .claude/skills/design-rules/SKILL.md
  • .claude/skills/design-rules/scripts/validate.sh
  • .gitignore
  • backend/account_v2/DESIGN_RULES.md
  • backend/workflow_manager/DESIGN_RULES.md
  • design-rules/README.md
  • design-rules/adr/ADR-001-org-scoping-query-layer.md
  • design-rules/adr/ADR-002-no-org-fk-on-execution.md
  • design-rules/adr/ADR-003-usage-string-refs.md
  • design-rules/adr/ADR-005-prompt-studio-registry-publish-gate.md
  • design-rules/adr/ADR-006-organization-rate-limit-separation.md
  • design-rules/adr/ADR-007-adapter-access-runtime-validation.md
  • design-rules/adr/ADR-012-connectorauth-user-owned.md
  • design-rules/adr/ADR-014-internal-external-api-separation.md
  • design-rules/adr/README.md
  • design-rules/ai-review-checklist.md
  • design-rules/definition-of-done.md
  • design-rules/lifecycle.md
  • design-rules/per-component-contract.md
  • design-rules/principles.md
  • design-rules/security/standards.md
  • design-rules/security/tenant-isolation.md
  • unstract/connectors/DESIGN_RULES.md
  • unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md
  • workers/shared/DESIGN_RULES.md

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 8, 2026

Tip:

Greploops — Automatically fix all review issues by running /greploops in Claude Code. It iterates: fix, push, re-review, repeat until 5/5 confidence.

Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal.

In-scope docs/skill fixes flagged by the bots on PR #1908. Out-of-scope
code findings (ExecutionViewSet bypassing OrganizationFilterBackend)
are deliberately not addressed here — the rules stay strict and the
drift is left visible for a follow-up code PR to fix; Known Exceptions
are reserved for deliberate, evaluated deviations, not "we haven't
decided yet."

Changes:

* .claude/skills/design-rules/SKILL.md
  - `review` trap table: "Missing auth" now references P5 (fail closed
    on permission decisions), not P8 (internal/external API
    separation). P8 is about URL/auth middleware separation.
  - `add` subcommand: ADR template in the fenced block dropped the
    stale `Status: Accepted` row and gained a `markdown` language tag
    (markdownlint MD040). Now points at design-rules/adr/README.md for
    the authoritative supersession flow.
  - `update` subcommand: replaced the stale "Status: Superseded by
    ADR-NNN" guidance with the pure-delete supersession flow.
  - Path reference table: dropped hard-coded counts (22/9/10) and
    softened scope language to "where present" — matches the
    prototype-first rollout.

* .claude/skills/design-rules/scripts/validate.sh
  - bash 3.2 portability: replaced `mapfile` (bash 4+, missing on
    macOS default) with a portable `while read -r -d ''` loop over
    `find -print0`. Fixes script breakage on macOS reviewers.
  - Per-check pass/fail tracking: each of the three checks now prints
    its own OK/FAIL regardless of whether an earlier check failed.
    Previously the global `fail` flag was being used as a per-check
    gate, silently swallowing the "OK" message on downstream checks.
  - Empty-array expansion under `set -u`: used
    `"${COMPONENT_FILES[@]+"${COMPONENT_FILES[@]}"}"` in loop bodies
    to avoid the bash 4.0-4.3 unbound-variable trip on an empty
    COMPONENT_FILES array.

* design-rules/adr/ADR-006-organization-rate-limit-separation.md
  - Corrected the model location: OrganizationRateLimit lives in
    `backend/api_v2/models.py` (the `api_v2` app), not the
    `configuration` app. Verified by grep on the model definition.

* design-rules/security/tenant-isolation.md
  - Layer 1 fail-mode description corrected to match the actual
    `CustomAuthMiddleware` implementation: 403 is only raised when
    `request.organization_id` is set on the URL and cannot be
    resolved; requests without an org target are allowed through
    Layer 1 and fail-closed at Layer 2/3. The middleware is
    identity-and-binding, not the primary fail-closed boundary —
    Layer 3 (`OrganizationFilterBackend`) is.

* workers/shared/DESIGN_RULES.md
  - R3 `Enforced by` mixed two legitimate patterns ("not yet enforced"
    and "code review only"). Picked "code review only" — that is the
    actual current enforcement state; "not yet enforced" requires a
    tracker reference per the contract.

Not addressed in this PR (deliberately):

* ExecutionViewSet bypassing OrganizationFilterBackend
  (workflow_manager.R2): the rule stays strict; documenting the
  current bypass as a Known Exception would bless a pattern that
  hasn't been evaluated. Tracker entry to be opened separately.

* validate.sh "OK" wording and "smell if >80 lines" targets, SKILL.md
  trigger-phrase refinements, and similar nice-to-haves: out of scope
  for the review-feedback batch. Will land with UN-3397 or a later
  cleanup.

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

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

Inline comments:
In @.claude/skills/design-rules/SKILL.md:
- Line 37: The phrase "component Dos/Don'ts" (and any other occurrences of
"Dos/Don'ts/Acceptance criteria") in SKILL.md should be changed to the canonical
per-component contract format: replace those references with "## Rules" and
require enumerated entries R1..Rn, each accompanied by the mandated table fields
(Severity / Why / Refs / Enforced by); update the line containing "| **get** |
... component Dos/Don'ts |" to describe "## Rules (R1..Rn) with table: Severity
/ Why / Refs / Enforced by" and make the same wording change for the other
instances that mention Dos/Don'ts/Acceptance criteria so the file uses the
canonical terminology everywhere.
- Around line 41-42: Update the "validate" output description in SKILL.md (the
row labeled validate) so it matches the actual validator behavior: list the
pass/fail report for forbidden-word grep, compatibility-statement presence
check, and component-directory sanity checks, and remove the mention of ADR-link
resolution (which the script does not perform); ensure the wording references
the same "validate" label so readers can map it to the validator script results.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd9eee08-4520-4b57-94ee-3e2e27ef7fa3

📥 Commits

Reviewing files that changed from the base of the PR and between 1ced2ca and 3eda6e7.

📒 Files selected for processing (5)
  • .claude/skills/design-rules/SKILL.md
  • .claude/skills/design-rules/scripts/validate.sh
  • design-rules/adr/ADR-006-organization-rate-limit-separation.md
  • design-rules/security/tenant-isolation.md
  • workers/shared/DESIGN_RULES.md
✅ Files skipped from review due to trivial changes (4)
  • design-rules/adr/ADR-006-organization-rate-limit-separation.md
  • workers/shared/DESIGN_RULES.md
  • design-rules/security/tenant-isolation.md
  • .claude/skills/design-rules/scripts/validate.sh

muhammad-ali-e and others added 2 commits April 8, 2026 16:49
The "## Known Exceptions" section was previously mandatory — the
contract said absence meant "the contract is not being followed" and
the single line `None.` was required when the file had no exceptions.

In practice this is cargo culting. The baseline for Known Exceptions
is zero: most files will never have one because exceptions are rare by
definition. Mandating a `None.` placeholder on every file:

- Adds ~4 lines of noise per per-component file (trained readers to
  skip the section)
- Gives the same failure mode as optional (`None.` written reflexively
  without the author evaluating whether exceptions exist is
  indistinguishable from a missing section)
- Defeats the purpose of the section when a real exception is added,
  because readers have learned to scroll past it

Change the contract to require the section only when at least one
intentional, accepted exception exists. Absence of the section now
means "no known exceptions today" — equivalent to `None.` but without
the placeholder noise.

Also tightened the Known Exceptions definition to be explicit that an
entry documents an *evaluated, accepted* deviation, not "drift we
haven't decided about yet." Unevaluated drift belongs in the issue
tracker, not in a Known Exceptions entry. This is the lesson from the
ExecutionViewSet finding on PR #1908 — a Known Exception added for
unexamined drift would be fraud-by-documentation.

Files changed:

* design-rules/per-component-contract.md
  - Section structure row #8 now says the section is optional and
    describes the presence-only semantics.
  - Known Exceptions format prose updated: explicit "optional", no
    `None.` placeholder, entry semantics hardened to "evaluated,
    accepted" only.

* backend/account_v2/DESIGN_RULES.md
* backend/workflow_manager/DESIGN_RULES.md
* unstract/connectors/DESIGN_RULES.md
* unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md
* workers/shared/DESIGN_RULES.md
  - Dropped the empty `## Known Exceptions` / `None.` block from each
    prototype file. All 5 files now go straight from the last rule (or
    horizontal rule) to `## Checklist`.

validate.sh still passes — nothing in the script depends on the
Known Exceptions section being present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CodeRabbit (2026-04-08T11:10Z) flagged two remaining terminology
drifts in the design-rules skill instructions:

1. The "What you'll get" row for the `validate` mode claimed the
   script checks "ADR-link resolution" — the script does not, and
   has never done so. Corrected to list the three actual checks:
   forbidden-word scan, compatibility-statement presence, and
   component-directory sanity.

2. Five places inside the skill still used the old "Dos / Don'ts /
   Acceptance criteria" vocabulary to describe per-component content,
   which contradicts the canonical per-component contract requiring
   `## Rules` with `R1..Rn` entries and the four-row (Severity / Why /
   Refs / Enforced by) table. Replaced each with the canonical
   terminology:

   - Quick Start "get" row: "component Dos/Don'ts" → "the component's
     `## Rules` entries (`R1..Rn` with Severity / Why / Refs /
     Enforced by)"
   - Command `get` step 3 bundle item: same replacement, plus an
     explicit mention of `## Known Exceptions` entries when present
   - Command `add` per-component step 4: dropped "Dos / Don'ts in
     source material" wording, replaced with the canonical
     `No component-specific rules yet.` placeholder under `## Rules`
     and an explicit warning that inventing Dos/Don'ts is forbidden
   - Command `review` step 3: walk the component's `## Rules`
     (`R1..Rn`) rather than "the component's Dos / Don'ts"

The only remaining "Dos/Don'ts" mention in SKILL.md is the explicit
prohibition in the `add` step — it tells contributors the old shape
is not allowed, not that they should use it.

No behavioural change. Purely terminology alignment with the contract.

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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

♻️ Duplicate comments (2)
design-rules/README.md (1)

52-53: ⚠️ Potential issue | 🟡 Minor

Update ADR format reference to match convention.

Step 2 references "Status / Context / Decision / Consequences" but according to adr/README.md line 41, ADRs have no Status field. The format should be Context / Decision / Consequences only.

📝 Proposed fix
-| 2 | Use the format: Status / Context / Decision / Consequences. |
+| 2 | Use the format: Context / Decision / Consequences (three sections exactly). |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@design-rules/README.md` around lines 52 - 53, Update the ADR format reference
in the Step 2 list entry that currently reads "Status / Context / Decision /
Consequences" to match the convention used in adr/README (remove Status) so it
reads "Context / Decision / Consequences"; locate the exact text string "Status
/ Context / Decision / Consequences" in the design-rules README and replace it
with "Context / Decision / Consequences" ensuring any surrounding explanatory
text remains consistent.
design-rules/adr/README.md (1)

52-53: ⚠️ Potential issue | 🟡 Minor

Update ADR format reference to match "no Status field" rule.

Step 2 instructs to "Use the format: Status / Context / Decision / Consequences" but this contradicts the stated rule that ADRs have no Status field (line 41).

📝 Proposed fix
-| 2 | Use the format: Status / Context / Decision / Consequences. |
+| 2 | Use the format: Context / Decision / Consequences (three sections exactly). |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@design-rules/adr/README.md` around lines 52 - 53, The README currently
instructs "Use the format: Status / Context / Decision / Consequences", which
contradicts the repo rule that ADRs have no Status field; edit the sentence to
remove "Status" so it reads "Use the format: Context / Decision / Consequences"
and ensure any nearby example or line that references "Status" is updated to
match the no-Status rule (search for the exact phrase "Use the format: Status /
Context / Decision / Consequences" and replace it with "Use the format: Context
/ Decision / Consequences" and update any adjacent examples or references
accordingly).
🧹 Nitpick comments (3)
design-rules/adr/ADR-007-adapter-access-runtime-validation.md (1)

5-5: Optional: Consider more concise phrasing.

For brevity, "at the moment" could be replaced with "when": "could be validated only when a workflow is created."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@design-rules/adr/ADR-007-adapter-access-runtime-validation.md` at line 5,
Change the phrase "at the moment a workflow is created" to "when a workflow is
created" in the sentence that currently reads "Adapter access (which user/org
may use which LLM, embedding, or vector store adapter) could be validated only
at the moment a workflow is created."—update that exact sentence in
ADR-007-adapter-access-runtime-validation.md to use "when" for more concise
phrasing.
design-rules/ai-review-checklist.md (1)

34-36: Consider splitting compound question into two separate checks.

The second P4 question asks both "is the intent documented inline" AND "is the cascade safe for audit/retention". This could be clearer as two distinct checklist items.

♻️ Optional: Split into two questions
 | **Question** | If the change touches usage, billing, or audit-style records, do those records survive the deletion of their source? |
-| **Question** | Does this PR add or change an `on_delete` behavior on an FK? If yes, is the intent documented inline on the field, and is the cascade safe for audit/retention (P4)? Models are the source of truth for cascades — verify via `grep on_delete` rather than a separate list. |
+| **Question** | Does this PR add or change an `on_delete` behavior on an FK? If yes, is the intent documented inline on the field? |
+| **Question** | For any new/changed `on_delete` behavior, is the cascade safe for audit/retention (P4)? Models are the source of truth for cascades — verify via `grep on_delete` rather than a separate list. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@design-rules/ai-review-checklist.md` around lines 34 - 36, Split the compound
checklist line that currently combines two checks into two separate checklist
items: keep one item that asks "Does this PR add or change an `on_delete`
behavior on an FK? If yes, is the intent documented inline on the field?" and a
second item that asks "If yes, is the cascade safe for audit/retention (P4)?"
Update the markdown table rows so each question has its own row and ensure the
wording matches the original phrasing (refer to the existing lines containing
`on_delete` and "cascade safe for audit/retention (P4)") so reviewers can answer
each independently.
.claude/skills/design-rules/SKILL.md (1)

133-137: Consider rewording for variety.

Three consecutive sentences start with "If", which slightly reduces readability. Consider using varied sentence structures while maintaining the logical flow.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/design-rules/SKILL.md around lines 133 - 137, The three
consecutive list entries (items "2.", "3.", and "4.") in SKILL.md start with
"If", hurting readability; revise the wording to vary sentence openings while
preserving meaning — e.g., change one "If" to "When" or start a sentence with an
active verb like "Update" or "Ensure that", or merge clauses to avoid
repetition; apply these edits directly to the numbered entries (2, 3, 4) in the
principle list and keep the original intent and emphasis (do not add or remove
rules), ensuring punctuation and emphasis (**bold**/`Status`) remain 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 @.claude/skills/design-rules/SKILL.md:
- Around line 103-117: The fenced code block that begins with ``` containing the
ADR template (starting with "# ADR-NNN: <title>") lacks a language identifier;
update the opening fence from ``` to ```markdown so the ADR template is treated
as Markdown (look for the triple-backtick fence that wraps the ADR content / the
"# ADR-NNN: <title>" heading) and replace it accordingly.

In `@backend/account_v2/DESIGN_RULES.md`:
- Line 65: Replace the generic phrase in the table cell that reads "| **Enforced
by** | not yet enforced — see project issue tracker (credential lifecycle) |"
with a concrete tracker reference (e.g., an issue ID or ADR identifier and
optional short URL) so the enforcement debt is auditable; update the cell to
reference the specific identifier (for example "not yet enforced — see
ISSUE-1234" or "not yet enforced — see ADR-2026-02") and ensure the identifier
matches the actual issue/ADR in the repository or issue tracker.
- Line 22: Update the incorrect principle reference that maps "fail-closed" to
P8: find the table row containing "`principles.md` | P1 (org scoping), P2
(credentials), P8 (fail-closed)" and change P8 to P5, and also update the second
occurrence that maps fail-closed to P8 (the other table entry around the same
section) to P5 so both references point to the actual P5 definition in
principles.md.

In `@design-rules/per-component-contract.md`:
- Line 79: The document claims validate.sh checks rule-field/checklist literal
contents but the script currently only verifies field presence; either update
validate.sh to perform the deeper checks or change the wording in
design-rules/per-component-contract.md to reflect actual behavior. To fix:
either (A) extend the validate.sh script to parse each rule and verify that the
four rows "Severity", "Why", "Refs", and "Enforced by" contain valid non-empty
literals (add parsing logic and explicit error messages for missing/empty
values), or (B) modify the sentences that reference validate.sh (the lines
mentioning it validates rule-field/checklist literals) to state it only checks
presence of those fields; reference validate.sh and the rule text "Every rule
must have all four rows (Severity, Why, Refs, Enforced by)" when making the
change.

In `@design-rules/principles.md`:
- Line 16: The document uses inconsistent mixin names:
`DefaultOrganizationMixin` here vs `DefaultOrganizationManagerMixin` in the
tenant-isolation doc; pick one canonical symbol and update both locations to
match (e.g., rename `DefaultOrganizationMixin` to
`DefaultOrganizationManagerMixin` or vice versa), then search for and replace
all occurrences of the non-canonical symbol across the docs and examples
(including references inside `design-rules/principles.md` and
`design-rules/security/tenant-isolation.md`) and ensure the README, code
snippets, and any class/mixin declarations (e.g., class or function names that
implement the mixin) use the chosen name consistently.

In `@design-rules/security/tenant-isolation.md`:
- Around line 23-24: The docs use two inconsistent
names—DefaultOrganizationManagerMixin and DefaultOrganizationMixin—so pick one
canonical symbol (e.g., DefaultOrganizationManagerMixin) and update all docs to
match; specifically change the reference in design-rules/principles.md
(currently DefaultOrganizationMixin) to the chosen canonical name and make the
same substitution wherever the alternate occurs (table entry in
tenant-isolation.md and any other mentions) so all design-rules docs
consistently refer to the same class/mixin name.

In `@unstract/connectors/DESIGN_RULES.md`:
- Line 22: Update the incorrect principle ID for "fail-closed" in the
DESIGN_RULES.md table entries that currently list "P8"; change those occurrences
to "P5" so the row reading "`[principles.md](../../design-rules/principles.md) |
P2 (credentials), P8 (fail-closed) |`" becomes
"`[principles.md](../../design-rules/principles.md) | P2 (credentials), P5
(fail-closed) |`" (and likewise for the other identical occurrence).

---

Duplicate comments:
In `@design-rules/adr/README.md`:
- Around line 52-53: The README currently instructs "Use the format: Status /
Context / Decision / Consequences", which contradicts the repo rule that ADRs
have no Status field; edit the sentence to remove "Status" so it reads "Use the
format: Context / Decision / Consequences" and ensure any nearby example or line
that references "Status" is updated to match the no-Status rule (search for the
exact phrase "Use the format: Status / Context / Decision / Consequences" and
replace it with "Use the format: Context / Decision / Consequences" and update
any adjacent examples or references accordingly).

In `@design-rules/README.md`:
- Around line 52-53: Update the ADR format reference in the Step 2 list entry
that currently reads "Status / Context / Decision / Consequences" to match the
convention used in adr/README (remove Status) so it reads "Context / Decision /
Consequences"; locate the exact text string "Status / Context / Decision /
Consequences" in the design-rules README and replace it with "Context / Decision
/ Consequences" ensuring any surrounding explanatory text remains consistent.

---

Nitpick comments:
In @.claude/skills/design-rules/SKILL.md:
- Around line 133-137: The three consecutive list entries (items "2.", "3.", and
"4.") in SKILL.md start with "If", hurting readability; revise the wording to
vary sentence openings while preserving meaning — e.g., change one "If" to
"When" or start a sentence with an active verb like "Update" or "Ensure that",
or merge clauses to avoid repetition; apply these edits directly to the numbered
entries (2, 3, 4) in the principle list and keep the original intent and
emphasis (do not add or remove rules), ensuring punctuation and emphasis
(**bold**/`Status`) remain unchanged.

In `@design-rules/adr/ADR-007-adapter-access-runtime-validation.md`:
- Line 5: Change the phrase "at the moment a workflow is created" to "when a
workflow is created" in the sentence that currently reads "Adapter access (which
user/org may use which LLM, embedding, or vector store adapter) could be
validated only at the moment a workflow is created."—update that exact sentence
in ADR-007-adapter-access-runtime-validation.md to use "when" for more concise
phrasing.

In `@design-rules/ai-review-checklist.md`:
- Around line 34-36: Split the compound checklist line that currently combines
two checks into two separate checklist items: keep one item that asks "Does this
PR add or change an `on_delete` behavior on an FK? If yes, is the intent
documented inline on the field?" and a second item that asks "If yes, is the
cascade safe for audit/retention (P4)?" Update the markdown table rows so each
question has its own row and ensure the wording matches the original phrasing
(refer to the existing lines containing `on_delete` and "cascade safe for
audit/retention (P4)") so reviewers can answer each independently.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8e0d312d-e6e8-4fb3-b412-3f3c26fdc02c

📥 Commits

Reviewing files that changed from the base of the PR and between c9ffd9d and bdd18a2.

📒 Files selected for processing (25)
  • .claude/skills/design-rules/SKILL.md
  • .claude/skills/design-rules/scripts/validate.sh
  • .gitignore
  • backend/account_v2/DESIGN_RULES.md
  • backend/workflow_manager/DESIGN_RULES.md
  • design-rules/README.md
  • design-rules/adr/ADR-001-org-scoping-query-layer.md
  • design-rules/adr/ADR-002-no-org-fk-on-execution.md
  • design-rules/adr/ADR-003-usage-string-refs.md
  • design-rules/adr/ADR-005-prompt-studio-registry-publish-gate.md
  • design-rules/adr/ADR-006-organization-rate-limit-separation.md
  • design-rules/adr/ADR-007-adapter-access-runtime-validation.md
  • design-rules/adr/ADR-012-connectorauth-user-owned.md
  • design-rules/adr/ADR-014-internal-external-api-separation.md
  • design-rules/adr/README.md
  • design-rules/ai-review-checklist.md
  • design-rules/definition-of-done.md
  • design-rules/lifecycle.md
  • design-rules/per-component-contract.md
  • design-rules/principles.md
  • design-rules/security/standards.md
  • design-rules/security/tenant-isolation.md
  • unstract/connectors/DESIGN_RULES.md
  • unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md
  • workers/shared/DESIGN_RULES.md

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.claude/skills/design-rules/SKILL.md (1)

198-198: Prefer non-hardcoded ADR count in path reference.

Line [198] hardcodes 8 accepted ADRs, which will go stale as soon as a new ADR lands. Consider using count-neutral wording.

Suggested wording tweak
-| `design-rules/adr/ADR-*.md` | 8 accepted ADRs. |
+| `design-rules/adr/ADR-*.md` | Accepted ADRs. |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/design-rules/SKILL.md at line 198, Replace the hardcoded
phrase "8 accepted ADRs" in the SKILL.md entry that references
`design-rules/adr/ADR-*.md` with count-neutral wording (e.g., "accepted ADRs" or
"multiple accepted ADRs") so the statement does not become stale; update the
line containing the literal `8 accepted ADRs` to use the chosen neutral phrasing
while keeping the path `design-rules/adr/ADR-*.md` intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@design-rules/per-component-contract.md`:
- Around line 172-175: The paragraph claiming that "## Known Exceptions" is
required conflicts with earlier statements that the section is optional; update
the text in design-rules/per-component-contract.md so the guidance is consistent
by stating that "## Known Exceptions" is optional and should only be included
when there are actual exceptions (leave "## Rules" and "## Checklist"
requirements as-is), and ensure the sentence references the section header "##
Known Exceptions" exactly to avoid ambiguity with lines that declare it
optional.

---

Nitpick comments:
In @.claude/skills/design-rules/SKILL.md:
- Line 198: Replace the hardcoded phrase "8 accepted ADRs" in the SKILL.md entry
that references `design-rules/adr/ADR-*.md` with count-neutral wording (e.g.,
"accepted ADRs" or "multiple accepted ADRs") so the statement does not become
stale; update the line containing the literal `8 accepted ADRs` to use the
chosen neutral phrasing while keeping the path `design-rules/adr/ADR-*.md`
intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a8a4ebd7-dbc5-40e7-9f1b-82797da5f48f

📥 Commits

Reviewing files that changed from the base of the PR and between 3eda6e7 and 6924017.

📒 Files selected for processing (7)
  • .claude/skills/design-rules/SKILL.md
  • backend/account_v2/DESIGN_RULES.md
  • backend/workflow_manager/DESIGN_RULES.md
  • design-rules/per-component-contract.md
  • unstract/connectors/DESIGN_RULES.md
  • unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md
  • workers/shared/DESIGN_RULES.md
✅ Files skipped from review due to trivial changes (4)
  • backend/workflow_manager/DESIGN_RULES.md
  • workers/shared/DESIGN_RULES.md
  • unstract/connectors/DESIGN_RULES.md
  • backend/account_v2/DESIGN_RULES.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • unstract/connectors/src/unstract/connectors/databases/DESIGN_RULES.md

muhammad-ali-e and others added 2 commits April 8, 2026 17:08
Eight new CodeRabbit findings landed on PR #1908 after the
terminology-alignment push. Seven are real; one is a stale re-scan of
an already-fixed item. Fixing the seven in place; the eighth (SKILL.md
fence without language identifier at line 103) is already resolved by
commit 3eda6e7 and needs no action.

Changes:

* backend/account_v2/DESIGN_RULES.md
  - Read first table: principle reference for fail-closed was P8, now
    P5. P8 is "internal vs external surfaces," P5 is "fail closed on
    permission decisions" — R2 is about the second one.
  - R2 Refs: same fix (`principles.md#P8` → `principles.md#P5`).
  - R4 Enforced by: was `not yet enforced — see project issue tracker
    (credential lifecycle)`. The contract requires a concrete tracker
    reference for `not yet enforced`; no real tracker ID exists yet.
    Downgraded to `code review only` (the actual current enforcement
    state) — same move previously applied to workers/shared R3. If a
    real tracker ID ever gets assigned, flip back to the
    `not yet enforced` form with the ID.

* unstract/connectors/DESIGN_RULES.md
  - Read first table: P8 → P5 (same fail-closed fix as account_v2).
  - R4 (Connector errors surface as the framework's exception
    hierarchy): Refs previously pointed at `principles.md#P8`, which
    doesn't fit — R4 is about type-boundary hygiene between driver
    exceptions and the framework exception hierarchy, not about URL
    group / auth middleware separation (which is what P8 actually
    says). No existing principle fits cleanly. Removed the principle
    reference entirely; Refs now points only at `security/standards.md`,
    which is honest about the rule's provenance.

* design-rules/principles.md
  - P1 Implementation row previously named only
    `DefaultOrganizationMixin`, which is only the model mixin (adds
    the FK and auto-populates it on save). The query-time filter is
    provided by `DefaultOrganizationManagerMixin` (a separate manager
    mixin living in the same file — verified in
    backend/utils/models/organization_mixin.py). Updated the row to
    name both classes and explain the split: the model mixin adds the
    FK, the manager mixin filters queries, and together they provide
    auto-scoping for direct-FK models. CodeRabbit's suggestion to
    "reconcile to one name" was based on the incorrect assumption
    that the two names refer to the same class — they don't.

* design-rules/per-component-contract.md
  - Rule format section: softened the overclaim that `validate.sh`
    "checks the field presence" of rule rows. The script does not
    parse rule tables today; it only greps for the Compatibility
    substring, the forbidden-word list, and directory sanity. Reviewers
    are the current enforcement of rule-field presence, with a note
    that a future hardening pass may extend the script.
  - "When to add a per-component file" section: removed the stale
    "`## Known Exceptions` and `## Checklist` sections are still
    required" wording, which contradicted the earlier commit making
    `## Known Exceptions` optional. Now says only `## Checklist` is
    still required, and Known Exceptions is included only when an
    accepted exception exists.
  - Self-update reminder: softened item 2 to describe what
    `validate.sh` actually greps for (Compatibility blockquote
    wording, forbidden-word list) instead of the `## Checklist`
    section header and rule field names (which it does not currently
    grep for).

Not addressed (deliberately):

* SKILL.md line 103 fence language identifier: already fixed in
  commit 3eda6e7 (the fence is `` ```markdown ``, not bare). The
  CodeRabbit finding at 11:22:54Z is a stale re-scan of the
  pre-alignment state.

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

sonarqubecloud bot commented Apr 8, 2026

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

Test Results

Summary
  • Runner Tests: 11 passed, 0 failed (11 total)
  • SDK1 Tests: 178 passed, 0 failed (178 total)

Runner Tests - Full Report
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_logs}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_cleanup\_skip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_client\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_container\_run\_config\_without\_mount}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_run\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_get\_image\_for\_sidecar}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{runner/src/unstract/runner/clients/test\_docker.py}}$$ $$\textcolor{#23d18b}{\tt{test\_sidecar\_container}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{11}}$$ $$\textcolor{#23d18b}{\tt{11}}$$
SDK1 Tests - Full Report
filepath function $$\textcolor{#23d18b}{\tt{passed}}$$ SUBTOTAL
$$\textcolor{#23d18b}{\tt{tests/patches/test\_litellm\_cohere\_timeout.py}}$$ $$\textcolor{#23d18b}{\tt{TestPatchedEmbeddingSyncTimeoutForwarding.test\_timeout\_passed\_to\_client\_post}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/patches/test\_litellm\_cohere\_timeout.py}}$$ $$\textcolor{#23d18b}{\tt{TestPatchedEmbeddingSyncTimeoutForwarding.test\_none\_timeout\_passed\_to\_client\_post}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/patches/test\_litellm\_cohere\_timeout.py}}$$ $$\textcolor{#23d18b}{\tt{TestPatchedEmbeddingSyncTimeoutForwarding.test\_httpx\_timeout\_object\_forwarded}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/patches/test\_litellm\_cohere\_timeout.py}}$$ $$\textcolor{#23d18b}{\tt{TestMonkeyPatchApplied.test\_cohere\_handler\_patched}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/patches/test\_litellm\_cohere\_timeout.py}}$$ $$\textcolor{#23d18b}{\tt{TestMonkeyPatchApplied.test\_bedrock\_handler\_patched}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/patches/test\_litellm\_cohere\_timeout.py}}$$ $$\textcolor{#23d18b}{\tt{TestMonkeyPatchApplied.test\_patch\_module\_loaded\_via\_embedding\_import}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_round\_trip\_serialization}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_json\_serializable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_enum\_values\_normalized}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_string\_values\_accepted}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_auto\_generates\_request\_id}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_explicit\_request\_id\_preserved}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_optional\_organization\_id}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_empty\_executor\_params\_default}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_complex\_executor\_params}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_validation\_rejects\_empty\_required\_fields}}$$ $$\textcolor{#23d18b}{\tt{4}}$$ $$\textcolor{#23d18b}{\tt{4}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_all\_operations\_accepted}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionContext.test\_from\_dict\_missing\_optional\_fields}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_success\_round\_trip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_failure\_round\_trip}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_json\_serializable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_failure\_requires\_error\_message}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_success\_allows\_no\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_success\_rejects\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_failure\_factory}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_failure\_factory\_no\_metadata}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_error\_none\_in\_success\_dict}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_error\_in\_failure\_dict}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_default\_empty\_dicts}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_from\_dict\_missing\_optional\_fields}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_response\_contract\_extract}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_response\_contract\_index}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionResult.test\_response\_contract\_answer\_prompt}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestBaseExecutor.test\_cannot\_instantiate\_abstract}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestBaseExecutor.test\_concrete\_subclass\_works}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestBaseExecutor.test\_execute\_returns\_result}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_register\_and\_get}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_get\_returns\_fresh\_instance}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_register\_as\_decorator}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_list\_executors}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_list\_executors\_empty}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_get\_unknown\_raises\_key\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_get\_unknown\_lists\_available}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_duplicate\_name\_raises\_value\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_register\_non\_subclass\_raises\_type\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_register\_non\_class\_raises\_type\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_clear}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorRegistry.test\_execute\_through\_registry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionOrchestrator.test\_dispatches\_to\_correct\_executor}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionOrchestrator.test\_unknown\_executor\_returns\_failure}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionOrchestrator.test\_executor\_exception\_returns\_failure}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionOrchestrator.test\_exception\_result\_has\_elapsed\_metadata}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionOrchestrator.test\_successful\_result\_passed\_through}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionOrchestrator.test\_executor\_returning\_failure\_is\_not\_wrapped}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_sends\_task\_and\_returns\_result}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_uses\_default\_timeout}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_timeout\_from\_env}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_explicit\_timeout\_overrides\_env}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_timeout\_returns\_failure}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_generic\_exception\_returns\_failure}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_async\_returns\_task\_id}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_no\_app\_raises\_value\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_async\_no\_app\_raises\_value\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_failure\_result\_from\_executor}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_context\_serialized\_correctly}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_sends\_link\_and\_link\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_success\_only}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_error\_only}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_no\_callbacks}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_returns\_async\_result}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_no\_app\_raises\_value\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_context\_serialized}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_custom\_task\_id}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutionDispatcher.test\_dispatch\_with\_callback\_no\_task\_id\_omits\_kwarg}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_platform\_api\_key\_returned}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_platform\_api\_key\_missing\_raises}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_other\_env\_var\_from\_environ}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_missing\_env\_var\_raises}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_empty\_env\_var\_raises}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_stream\_log\_routes\_to\_logging}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_stream\_log\_respects\_level}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_stream\_error\_and\_exit\_raises\_sdk\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_execution.py}}$$ $$\textcolor{#23d18b}{\tt{TestExecutorToolShim.test\_stream\_error\_and\_exit\_wraps\_original}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatFromLlm.test\_from\_llm\_reuses\_llm\_instance}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatFromLlm.test\_from\_llm\_returns\_llmcompat\_instance}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatFromLlm.test\_from\_llm\_sets\_model\_name}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatFromLlm.test\_from\_llm\_does\_not\_call\_init}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_complete\_delegates\_to\_llm}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_chat\_delegates\_to\_llm\_complete}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_chat\_forwards\_kwargs\_to\_llm}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_complete\_forwards\_kwargs\_to\_llm}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_acomplete\_delegates\_to\_llm}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_achat\_delegates\_to\_llm\_acomplete}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_stream\_chat\_not\_implemented}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_stream\_complete\_not\_implemented}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_astream\_chat\_not\_implemented}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_astream\_complete\_not\_implemented}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_metadata\_returns\_emulated\_type}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_get\_model\_name\_delegates}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_get\_metrics\_delegates}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestLLMCompatDelegation.test\_test\_connection\_delegates}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestEmulatedTypes.test\_message\_role\_values}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestEmulatedTypes.test\_chat\_message\_defaults}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestEmulatedTypes.test\_chat\_response\_message\_access}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestEmulatedTypes.test\_completion\_response\_text}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestEmulatedTypes.test\_llm\_metadata\_defaults}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestMessagesToPrompt.test\_single\_user\_message}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestMessagesToPrompt.test\_none\_content\_becomes\_empty\_string}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestMessagesToPrompt.test\_preserves\_all\_messages}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestMessagesToPrompt.test\_multi\_turn\_conversation}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestMessagesToPrompt.test\_empty\_messages\_returns\_empty\_string}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_llm\_compat.py}}$$ $$\textcolor{#23d18b}{\tt{TestMessagesToPrompt.test\_string\_role\_fallback}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_success\_on\_first\_attempt}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_retry\_on\_connection\_error}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_non\_retryable\_http\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_retryable\_http\_errors}}$$ $$\textcolor{#23d18b}{\tt{3}}$$ $$\textcolor{#23d18b}{\tt{3}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_post\_method\_retry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_platform.py}}$$ $$\textcolor{#23d18b}{\tt{TestPlatformHelperRetry.test\_retry\_logging}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_prompt.py}}$$ $$\textcolor{#23d18b}{\tt{TestPromptToolRetry.test\_success\_on\_first\_attempt}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_prompt.py}}$$ $$\textcolor{#23d18b}{\tt{TestPromptToolRetry.test\_retry\_on\_errors}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/test\_prompt.py}}$$ $$\textcolor{#23d18b}{\tt{TestPromptToolRetry.test\_wrapper\_methods\_retry}}$$ $$\textcolor{#23d18b}{\tt{4}}$$ $$\textcolor{#23d18b}{\tt{4}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_connection\_error\_is\_retryable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_timeout\_is\_retryable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_http\_error\_retryable\_status\_codes}}$$ $$\textcolor{#23d18b}{\tt{3}}$$ $$\textcolor{#23d18b}{\tt{3}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_http\_error\_non\_retryable\_status\_codes}}$$ $$\textcolor{#23d18b}{\tt{5}}$$ $$\textcolor{#23d18b}{\tt{5}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_http\_error\_without\_response}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_os\_error\_retryable\_errno}}$$ $$\textcolor{#23d18b}{\tt{5}}$$ $$\textcolor{#23d18b}{\tt{5}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_os\_error\_non\_retryable\_errno}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestIsRetryableError.test\_other\_exception\_not\_retryable}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_exponential\_backoff\_without\_jitter}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_exponential\_backoff\_with\_jitter}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_max\_delay\_cap}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCalculateDelay.test\_max\_delay\_cap\_with\_jitter}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_successful\_call\_first\_attempt}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_retry\_after\_transient\_failure}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_max\_retries\_exceeded}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_retry\_with\_custom\_predicate}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_no\_retry\_with\_predicate\_false}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryWithExponentialBackoff.test\_exception\_not\_in\_tuple\_not\_retried}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_default\_configuration}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_environment\_variable\_configuration}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_max\_retries}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_base\_delay}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_invalid\_multiplier}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_jitter\_values}}$$ $$\textcolor{#23d18b}{\tt{2}}$$ $$\textcolor{#23d18b}{\tt{2}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_custom\_exceptions\_only}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_custom\_predicate\_only}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_both\_exceptions\_and\_predicate}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestCreateRetryDecorator.test\_exceptions\_match\_but\_predicate\_false}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_retry\_platform\_service\_call\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_retry\_prompt\_service\_call\_exists}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_platform\_service\_decorator\_retries\_on\_connection\_error}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestPreconfiguredDecorators.test\_prompt\_service\_decorator\_retries\_on\_timeout}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryLogging.test\_warning\_logged\_on\_retry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryLogging.test\_info\_logged\_on\_success\_after\_retry}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{tests/utils/test\_retry\_utils.py}}$$ $$\textcolor{#23d18b}{\tt{TestRetryLogging.test\_exception\_logged\_on\_giving\_up}}$$ $$\textcolor{#23d18b}{\tt{1}}$$ $$\textcolor{#23d18b}{\tt{1}}$$
$$\textcolor{#23d18b}{\tt{TOTAL}}$$ $$\textcolor{#23d18b}{\tt{178}}$$ $$\textcolor{#23d18b}{\tt{178}}$$

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
design-rules/per-component-contract.md (1)

44-44: Optional: Add language specifiers to fenced code blocks.

Fenced code blocks on lines 44 and 56 lack language identifiers. Adding markdown would enable syntax highlighting in some viewers.

✨ Proposed style improvement
-```
+```markdown
 > **Compatibility:** All changes to this component must remain compatible with extension by an external layer that runs this codebase alongside additional Django applications sharing the same database.

Apply the same pattern to line 56.
</details>


Also applies to: 56-56

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @design-rules/per-component-contract.md at line 44, Update the two fenced
code blocks that currently start with triple backticks and contain the
"Compatibility:" note to include a language specifier by replacing the
opening fences with markdown; specifically modify the fenced block that wraps the "**Compatibility:** All changes..." paragraph (the block at the first occurrence) and the second identical fenced block (the one mentioned at line 56) so they begin with markdown to enable syntax highlighting.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @design-rules/per-component-contract.md:

  • Line 44: Update the two fenced code blocks that currently start with triple
    backticks and contain the "Compatibility:" note to include a language
    specifier by replacing the opening fences with markdown; specifically modify the fenced block that wraps the "**Compatibility:** All changes..." paragraph (the block at the first occurrence) and the second identical fenced block (the one mentioned at line 56) so they begin with markdown to enable syntax
    highlighting.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: Organization UI

**Review profile**: CHILL

**Plan**: Pro

**Run ID**: `a24af5ff-3537-43e5-8e9d-7aa12d9f4540`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 6924017630e9e4042a17c46b8b005e60bb36d7c8 and 2459e87051138eebafd4d70d92ebf003bd97f012.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `backend/account_v2/DESIGN_RULES.md`
* `design-rules/per-component-contract.md`
* `design-rules/principles.md`
* `unstract/connectors/DESIGN_RULES.md`

</details>

<details>
<summary>✅ Files skipped from review due to trivial changes (2)</summary>

* backend/account_v2/DESIGN_RULES.md
* unstract/connectors/DESIGN_RULES.md

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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