[Feature] Collapse managed resources under business roles in the matrix - #933
Draft
fortigi-ci-bot[bot] wants to merge 17 commits into
Draft
[Feature] Collapse managed resources under business roles in the matrix#933fortigi-ci-bot[bot] wants to merge 17 commits into
fortigi-ci-bot[bot] wants to merge 17 commits into
Conversation
fortigi-ci-bot
Bot
requested review from
TaekeK and
WimvandenHeijkant
as code owners
August 4, 2026 12:24
Contributor
|
🤖 Built + verified on dev-docker-03. e2e on the live env + full CI green. Functional testing: https://3.build.identityatlas.io. Awaiting requestor acceptance on #370. |
Brings 61 commits of main (up to ac657ec) onto the #370 fold branch so the PR stops sitting on a 3-day-old base and picks up the bug fixes landed since. Conflict resolution, by tier: * .github/** — taken from main wholesale. The DoR agent had edited its own scripts during this build, but every one of those edits has since landed on main independently (#932, #936, #967), in several cases verbatim. Verified line-by-line that nothing unique was dropped: the only four lines absent from main were changed_summary's two-dot git range (main uses the better origin/main...HEAD) and the hardcoded sk:[sk3,sk5,…] fan-out matrix, which main deliberately replaced with derived runner labels + direct dispatch to the reservation holder (#950, #961). * MatrixGroupRow.jsx / MatrixView.jsx — real reconciliation. Main's Contexts column (#924) and its extraction of getRoleBadge into the shared getApRoleBadge (#949) now coexist with the fold affordance: the local badge copy is dropped in favour of the shared helper, and the row renders the fold toggle in the name cell followed by main's MatrixContextsCell. Confirmed the fold's synthetic role-child rows inherit `contexts` for free — they spread existing row objects rather than building new ones — so the new column is populated on the rows this feature adds. * matrix.spec.js / the mount tests — add/add of independent blocks; both sides kept. The e2e file was reassembled from the merge stages because both new describes opened with the same filter literal; verified main left the trailing scrollbar describe untouched, so the branch's edits to it survive intact. * Demo dataset — parts list is the union (role-drift + shared-grants + volume). Main's #928 test pinned the default company at 39 resources; #370 grew it to 46 (Verify-DemoDataset.ps1 already expected 46/7, and the doc's count tables already said so). Updated that pin and the three prose references main added that still said 39, so the dataset's documented and asserted counts agree. Verified: API 2123/2123, UI 1086/1087, demo-dataset Pester 44/46, lint clean (0 errors) on both packages. The one UI failure is a pre-existing en-NL locale artifact on this machine (toLocaleString gives 1.500, the test pins 1,500); the two Pester failures pre-date this merge and are fixed in the follow-up commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All three pre-date the main merge (verified by running the suites against the pre-merge branch tip) and none change product behaviour. * DemoDataset: `$pid` is a read-only PowerShell automatic variable, so assigning to it threw before the assertion ever ran and the "one resource, two business roles" case was never actually checked. Renamed to `$principalId`. PSScriptAnalyzer flags this as PSAvoidAssignmentToAutomaticVariable. * DemoDataset: the business-role count still pinned 5 after #370 added the role-drift and shared-grant roles. Verify-DemoDataset.ps1 and the doc's count table already said 7; this brings the last pin into line. * MatrixScopePanel: the tile-naming test hardcoded '1,500' while the panel formats with toLocaleString() and no explicit locale, so it passed only on an en-US runner and failed on e.g. en-NL. Asserts against the same formatter now. Verified: demo-dataset Pester 46/46, UI 1087/1087, API 2123/2123. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The branch added 061_business_role_covers_itself.sql but never ran the record step every migration-adding PR needs, so the gate reported "new migration not recorded". It went unnoticed because the workflow had been sitting at action_required on every prior push and had never actually run. Additive-only, as the ratchet requires: one line appended, no existing hash touched. Generated with a Node stand-in for tools/migrations/ratchet.py --update (no Python on this machine) that mirrors its hashing and output byte-for-byte; verified the gate's own check logic now passes over all 63. Note this makes 061 immutable: any further schema change coming out of functional testing needs a new 062 rather than an edit to 061. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The two CI failures the main merge finally let run. Neither was caused by the merge; both are the collision of #370's new row model with definitions that lived somewhere else. Excel export (main's #949 e2e, "exported cells disagree with the grid"): the export still read `orderedGroups`, the row list from before business roles adopt their resources, so it had one row per resource while the grid now draws a resource under every role that grants it. The export now comes from the same buildRoleLayout() the grid uses — no second row model to drift — but is built with an empty fold set, so it mirrors the grid's structure without inheriting its fold state. Folding is a reading aid; an access-review artifact must never quietly lose a resource because someone collapsed a role before hitting Export. That is what the hook's own header comment already claimed ("never what is fetched, counted or exported") and is now actually true. Governed history (integration, ts G=75 vs live G=124): migration 061 gave vw_UserPermissionAssignmentViaBusinessRole a second arm — holding a business role is itself governed access — but scopeHistory.js rebuilds that definition in SQL rather than reading the view, so 061 never reached it. Live counted the role-membership cells as governed, history did not, and the latest timeseries point disagreed with live scope-stats for the same instant. Added the matching arm, mirroring 061 exactly. Historical governed percentages rise: they were understating governance, not misreporting data. Both paths still restate one definition in two places, which is what let this drift. Worth collapsing later; noted rather than done here so the fix stays reviewable. Tests: hook-level (export ignores folds, row identity stays usable for cell lookups), mount-level (Export after "Fold roles" still receives the folded resources), and SQL-shape parity for 061's arm. UI 1090/1090, API 2124/2124, lint 0 errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…e cell The export e2e (#949) scraped the row name out of the name cell's innerText, stripping only a leading expander glyph. #370 put more in that cell — the fold toggle, the nesting elbow, and the "BR"/"BR+3" overlap chips — so the scrape started returning "SG-Monitoring-Tools\nBR" and every row failed to pair with its export row. The export itself was already correct; the reader was reading the affordances as part of the name. (The multi-line names are also why the failure listed phantom "BR (Group)" rows: one wrapped string.) Gives the display name an element of its own (`data-row-name`) and reads that, so anything else the name cell grows later can't be mistaken for the resource name again. A mount test locks the contract the e2e depends on. UI 1091/1091, lint 0 errors. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TaekeK
marked this pull request as draft
August 10, 2026 12:19
TaekeK
added a commit
that referenced
this pull request
Aug 10, 2026
…gate notice (#994) Three problems, all surfaced by #370 → PR #933, where the requestor said the PR should never have existed because they had not agreed to the solution. 1. The PR was opened ready-for-review on the FIRST build and every feedback round re-advertised "CI green". #933 sat like that through eight rounds of the requestor rejecting the design — one of which added a schema migration. Green checks mean the agent's own tests pass; they say nothing about whether the solution is the one that was asked for, and a green ready-for-review PR reads as mergeable. Open it as a draft; dor-acceptance.yml takes it out of draft on `approve`, the signal it already detects. CI runs on drafts unchanged (no workflow here filters on draft), so verify_loop is unaffected — the only thing a draft cannot do is merge. Branch protection and the human merge review are untouched. 2. The value gate asked the wrong person the wrong question. Its notice was a hardcoded @-list and its framing was purely spend ("nothing runs or spends until you do"); it never showed the spec, which by then was days up-thread. On #370 a maintainer approved and the PR then claimed it was built "from the approved spec" — while the requestor had never confirmed it. Address the requestor of record (authorize already resolves it; now exported), deep-link the certified spec, and ask whether it describes the solution they want. Anyone may still approve so an absent requestor cannot stall a build — the gate now records who did and says plainly when it was not the requestor. 3. #977 moved that notice INTO the `gate` job, which holds `environment: build-approval`. A job gated by required reviewers runs no step until approved, so the notice could only arrive after the approval it was asking for: an issue needing the gate would wait with nothing said on it. Latent so far — the one build since #977 took the autonomous path and skipped the gate. Split into an ungated `notify` job (asks) and the gated `gate` job (records, post-approval by construction). test/ci-scripts/test-dor-gate-notice.sh guards all three structurally, including the exact #977 shape: the job posting the notice must carry no `environment:`. 12 tests; 9 fail against the pre-change tree. Wired into the existing ci-scripts job in pr.yml. Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #370
Built autonomously by the DoR build agent from the approved spec. Functional-test env: https://3.build.identityatlas.io
Do not merge until CI is green and the requestor has accepted.