-
Notifications
You must be signed in to change notification settings - Fork 623
UN-3396 [MISC] Introduce design-rules system with prototype per-component files #1908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
muhammad-ali-e
wants to merge
9
commits into
main
Choose a base branch
from
misc/UN-3396-MISC_design_rules_prototype
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
591526a
UN-3396 [MISC] Introduce design-rules system with prototype per-compo…
muhammad-ali-e bdd18a2
Merge branch 'main' into misc/UN-3396-MISC_design_rules_prototype
muhammad-ali-e ef544fc
UN-3396 [MISC] Use [[ ]] in validate.sh per SonarQube
muhammad-ali-e 1ced2ca
UN-3396 [MISC] Sync design-rules/README.md with dropped-Status ADR fo…
muhammad-ali-e 3eda6e7
UN-3396 [MISC] Address coderabbit and greptile review feedback
muhammad-ali-e 9c05c93
UN-3396 [MISC] Make Known Exceptions section optional
muhammad-ali-e 6924017
UN-3396 [MISC] Align SKILL.md terminology with canonical contract format
muhammad-ali-e 66ab764
UN-3396 [MISC] Address coderabbit round 3 review feedback
muhammad-ali-e 2459e87
Merge branch 'main' into misc/UN-3396-MISC_design_rules_prototype
muhammad-ali-e File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
UN-3396 [MISC] Address coderabbit round 3 review feedback
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>
- Loading branch information
commit 66ab7648e6d4c70b5350c53d6db1afac5dc979f7
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.