You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SPIKE: Investigate Continuation In Numbering Format #33143
BC Business numbering users the company prefix (e.g. BC, C, FM) followed by seven digits.
E.g. FM1142783
CP1012674
BC1539994
In PROD a BC Benefit Company was recently continued in. The number assigned was C9900710. Since we had only been issuing numbers starting with 1 this raised concern that we are skipping numbers and may reach a point where we need to extend the total number of digits in the company number sooner. Review is required to understand logic for issuance of the Continuation In number (why did it start with 9 and skip a significant set of numbers in our current sequence).
Note: Elizabeth has requested that we provide her with a summary after review is complete.
This means the sequence in cprd for the 'C' corp_type is at 9900710 - I need someone to verify this as I don't have access to the database. If the sequence is not at 9900710 then I will debug furtherdone
Update
The sequence for 'C' corp types is at this value so the code is working as expected. It is actually supposed to be using the 'BC' sequence instead (that's what colin currently does) - discussion needed for next steps and verification
Chatted with @thorwolpert - and they relayed the following:
We did set the sequence higher for a couple of other types. Linda had said they had done that in the past so the help desk would know which system was being used. I don't think we decided on any policy or anything like that
For BEN Corps we used the same sequence as in Colin, so there was no break in numbering. I would've assumed cben would've been handled the same way
Looks like that flag has to be on, or it uses the Colin sequence generator
Chatted with @thorwolpert - and they relayed the following:
We did set the sequence higher for a couple of other types. Linda had said they had done that in the past so the help desk would know which system was being used. I don't think we decided on any policy or anything like that
For BEN Corps we used the same sequence as in Colin, so there was no break in numbering. I would've assumed cben would've been handled the same way
Looks like that flag has to be on, or it uses the Colin sequence generator
'Looks like that flag has to be on, or it uses the Colin sequence generator'
For corps it is supposed to use the colin sequence in dev, test, and prod - that flag 'enable-sandbox' effects several things throughout the business flow (i.e. payment, authentication, emails, etc.) and should only ever be turned on in the sandbox environment. The reason that condition is there is because there isn't a colin db for the sandbox so this allows processing of incorporations, etc. in the sandbox environment by removing the colin dependency - I don't think this is something we'll want to do for the other environments until the migration of corps is completed otherwise we'll end up with sequencing conflicts
'For BEN Corps we used the same sequence as in Colin, so there was no break in numbering. I would've assumed cben would've been handled the same way'
Yeah BEN companies use the colin 'BC' sequence (same as BC, CC, ULC). CBEN is configured to use the 'C' sequence in colin, but what I was saying above is that we saw the other 'C' companies being generated through colin were NOT actually using this sequence. I assume we want the numbering to be consistent with the current colin numbering for 'C' companies? Right now CBN's are going off a different sequence than the ones that aren't modernized yet (C, CCC and CUL)
The number its at is also potentially problematic because it'll run out of numbers before 1 million more are created which may be fine for now, but that's a much smaller window compared to the other sequences?
If I'm understanding correctly the only rationale was for help desk identification of the entity type. Given information on entity type can be easily obtained through the modernized system, and we run the risk of running out of numbers sooner, it seems there isn't enough value to warrant a unique/higher sequence.
I'd recommend we use the BC sequence for CBEN/C as well. We have regular meetings for SAF with these helpdesk groups and could share out there.
I think it's safer to use the Colin based sequence until all of the BCA types are moved over.
Afaict the "sandbox" flag was turned on in Prod.
As there is no sandbox environment in the Colin environment, it makes sense to use the local sequence in the sandbox ( the flag seems aptly named ) it was probably turned on in Prod by accident.
An issue that will exist is some businesses with a higher sequence number. Those can be renumbered (the Registrar has the right to change an existing reg) or we add some code to check if the sequence already exists and get a new one, so we don't try and save the same reg num twice
Activity
kialj876 commentedon Apr 30, 2026
Below outlines my findings:
Code path from the business-filer:
continuation_in.pyline 115 callsbusiness_info.get_next_corp_num(legalType)get_next_corp_numnormalises the type to"C"and POSTs to the COLIN APIcolin-api/src/colin_api/resources/business.pylines 99–119 validateslegal_type in ['BC', 'C']and callsBusiness.get_next_corp_numcolin-api/src/colin_api/models/business.pylines 688–718 atomically reads and increments the Oraclesystem_idtable:'%07d' % corp_num→ back inbusiness_info.pylines 152–155:"C9900710".This means the sequence in cprd for the 'C' corp_type is at 9900710 -
I need someone to verify this as I don't have access to the database. If the sequence is not at 9900710 then I will debug furtherdoneUpdate
The sequence for 'C' corp types is at this value so the code is working as expected. It is actually supposed to be using the 'BC' sequence instead (that's what colin currently does) - discussion needed for next steps and verification
TVWerdal commentedon May 1, 2026
Chatted with @thorwolpert - and they relayed the following:
kialj876 commentedon May 4, 2026
'Looks like that flag has to be on, or it uses the Colin sequence generator'
'For BEN Corps we used the same sequence as in Colin, so there was no break in numbering. I would've assumed cben would've been handled the same way'
mstanton1 commentedon May 4, 2026
If I'm understanding correctly the only rationale was for help desk identification of the entity type. Given information on entity type can be easily obtained through the modernized system, and we run the risk of running out of numbers sooner, it seems there isn't enough value to warrant a unique/higher sequence.
I'd recommend we use the BC sequence for CBEN/C as well. We have regular meetings for SAF with these helpdesk groups and could share out there.
@thorwolpert @TVWerdal @kialj876 any concerns with this approach?
thorwolpert commentedon May 4, 2026
I think it's safer to use the Colin based sequence until all of the BCA types are moved over.
Afaict the "sandbox" flag was turned on in Prod.
As there is no sandbox environment in the Colin environment, it makes sense to use the local sequence in the sandbox ( the flag seems aptly named ) it was probably turned on in Prod by accident.
An issue that will exist is some businesses with a higher sequence number. Those can be renumbered (the Registrar has the right to change an existing reg) or we add some code to check if the sequence already exists and get a new one, so we don't try and save the same reg num twice
kialj876 commentedon May 6, 2026
Okay so after meeting with Thor and Melissa we have a plan:
mstanton1 commentedon May 8, 2026
Closing as spike is complete. Implementation of change will be tackled in https://app.zenhub.com/workspaces/entities-team-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/33365.