fix(isms): harden internal-audit validation and edge cases from deploy review#3473
Merged
Conversation
…y review - reject a planned end date before the start date, client-side (zod cross-field rule with inline error) and server-side against the effective merged schedule on update - linked findings inherit the control row's reference as their clause label when none is given, and deleting a control row labels its label-less findings first — no finding is ever left unlabelled - add the optional Notes field to the add-control-row form - render the control-reference validation error in the row editor - preserve paragraph breaks when displaying the programme - don't count a whitespace-only signatory as signed - correct the F-NN reference doc comment (max+1 over surviving rows)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
cubic analysis
All reported issues were addressed across 13 files
Confidence score: 5/5
- Safe to merge after the addressed issues were fixed.
Linked issue analysis
Linked issue: CS-724: [Feature] Area- Internal Audit
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Enforce planned-date order on create and update (including merged-schedule validation and allowing moving both dates together) | Server now asserts date order in create and update (merged schedule check) and client schema enforces the same constraint; unit tests cover rejecting inverted ranges and allowing fixes that move both dates together. |
| ✅ | Linked findings always keep a clause label: findings inherit control reference when clauseOrControl omitted; explicit clause text wins; deleting a control backfills label-less linked findings | Finding create/update logic now derives clauseOrControl from the linked control when missing; resolveControl returns controlRef; deletion path updates linked findings before deleting the control. Tests exercise inheritance and backfill behavior. |
| ✅ | Add optional Notes field to the Add-Control-Row form so the Notes column can be filled on create | The Add control form now includes a notes Controller mapped to a Textarea with the Notes placeholder described in the issue. |
| ✅ | Row editor surfaces control-reference validation error instead of silently disabling Save | The controlRef input is wrapped in Field + FieldError and renders fieldState.error?.message so validation errors will be visible instead of silently disabling save. |
| ✅ | Planned end date input surfaces validation errors (client) | Planned end date Controller in the form now includes Field + FieldError to show validation messages; the client schema enforces ordering. |
| ✅ | Programme read view preserves paragraph breaks | Read-only rendering now wraps the programme text with whitespace-pre-wrap so multi-line paragraphs preserve breaks as requested. |
| ✅ | Sign-off 'N of 3 signed' badge trims names so whitespace-only signatories don’t count | Signed-count logic now trims name values before counting, matching API normalization of whitespace-only signatories to null. |
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Re-read the stored dates inside the locked transaction so two concurrent partial updates (one moving the start, one the end) can never persist an inverted schedule. Adds coverage for update-time clause-label inheritance.
claudfuen
pushed a commit
that referenced
this pull request
Jul 22, 2026
# [3.106.0](v3.105.0...v3.106.0) (2026-07-22) ### Bug Fixes * **auth:** attribute API-key mutations to the key's creator, not the org owner ([#3472](#3472)) ([206ed96](206ed96)), closes [hi#risk](https://github.com/hi/issues/risk) * **deps:** bump adm-zip 0.5.18 -> 0.6.0 in apps/api (Dependabot [#88](https://github.com/trycompai/comp/issues/88)/[#89](https://github.com/trycompai/comp/issues/89)) ([#3462](#3462)) ([300f2a1](300f2a1)), closes [#3451](#3451) * **deps:** override tar to ^7.5.19 to clear node-tar Dependabot alerts ([#94](https://github.com/trycompai/comp/issues/94)-[#104](https://github.com/trycompai/comp/issues/104)) ([#3466](#3466)) ([8ab5709](8ab5709)) * **deps:** patch engine.io ([#93](#93)) and body-parser ([#92](#92)) Dependabot alerts ([#3464](#3464)) ([94c33b1](94c33b1)) * **isms:** harden internal-audit validation and edge cases from deploy review ([#3473](#3473)) ([c6c7379](c6c7379)) * **policies:** create draft version on policy regenerate instead of overwriting published ([#3471](#3471)) ([ff31dbd](ff31dbd)) * **policies:** delete detached PDF objects when regenerating a draft ([#3474](#3474)) ([ecd1bd0](ecd1bd0)) * **policies:** rename CreateVersionDto to avoid swagger collision with automations ([#3469](#3469)) ([2d5290a](2d5290a)) ### Features * **isms:** internal audit programme, plan and report — clause 9.2 (CS-724) ([#3468](#3468)) ([42e5ebd](42e5ebd)), closes [hi#impact](https://github.com/hi/issues/impact)
Contributor
|
🎉 This PR is included in version 3.106.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Follow-up to #3468, addressing the cubic findings raised on the production deploy PR (#3463) against the merged CS-724 code. Six of the eight findings were real; both remaining ones are answered on their threads.
Fixes
clauseOrControlnow inherits the control row's reference, and deleting a control row first labels any linked label-less findings with its reference. TheSetNullFK can no longer strand a finding with neither link nor label in the generated document.whitespace-pre-wrap) so it matches what was typed.Answered on the #3463 threads (not changed)
contentSnapshot, so a reused reference in a new draft cannot rewrite history. Persisting a sequence table isn't warranted in v1.The ninth finding on #3463 (
update-policy-helpers.tsS3 orphan on policy regenerate) belongs to #3471, not CS-724.Verification
bun run --filter '@trycompai/app' build(the Vercel gate) exits 0Linear: CS-724