32692 Flag for CoD backdating for Out of Order Director Logic #4139
Merged
loneil merged 2 commits intobcgov:mainfrom Mar 6, 2026
Merged
32692 Flag for CoD backdating for Out of Order Director Logic #4139loneil merged 2 commits intobcgov:mainfrom
loneil merged 2 commits intobcgov:mainfrom
Conversation
Signed-off-by: Lucas <lucasoneil@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a feature flag to allow backdated Change of Directors (CoD) filings (to support out-of-order director logic), and updates CoD date validation behavior + unit tests accordingly.
Changes:
- Introduces
enable-backdated-codflag (defaultfalse) to relax CoD backdating constraints. - Updates CoD validation to adjust date bounds when the flag is enabled and to enforce “not before most recent CoD/AR-with-CoD” when disabled.
- Adds/extends unit tests covering effective date and director appointment/cessation date behavior with flag on/off.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| legal-api/tests/unit/services/filings/validations/change_of_director/test_validation_effective_date.py | Adds tests asserting effective-date lower-bound behavior vs prior CoD/AR filings, plus flag-enabled backdating case. |
| legal-api/tests/unit/services/filings/validations/change_of_director/test_validation_directors_dates.py | Adds tests ensuring director appointment/cessation date bounds change correctly when the backdating flag is enabled, plus unit tests for get_cod_date_bounds. |
| legal-api/src/legal_api/services/filings/validations/change_of_directors.py | Implements flag-aware date-bounds logic and adds an effective-date check against the most recent prior CoD (including ARs containing CoD). |
| legal-api/flags.json | Registers new enable-backdated-cod feature flag with default value false. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Lucas <lucasoneil@gmail.com>
|
3 tasks
vysakh-menon-aot
approved these changes
Mar 6, 2026
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.


Issue #: /bcgov/entity#32692
Description of changes:
Add in a new feature flag
enable-backdated-codto match the frontend one so we can toggle validation of "Out of Order Director" dates on legal-api.Conditionally ignore date boundaries (that say they cannot be before a previous CoD or AR) for
Flag defaults to false (we have it on in dev), set to True to ignore the specific validation
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the lear license (Apache 2.0).