Skip to content

Initialize Bootstrap appHash before reload checks#669

Closed
Copilot wants to merge 4 commits into
developmentfrom
copilot/fix-app-hash-param
Closed

Initialize Bootstrap appHash before reload checks#669
Copilot wants to merge 4 commits into
developmentfrom
copilot/fix-app-hash-param

Conversation

Copilot AI commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Bootstrap.reloadChecks() can run before loadColdBox() on first request or after a restart. In that path, the lock name referenced appHash before it had been initialized, which could fail bootstrap recovery when startup errors occurred.

  • Bootstrap initialization

    • Initialize appHash in Bootstrap.init() so it is available before loadColdBox() runs.
    • Avoid resolving appHash in the component-level param block, since that can run before the application scope is available on first startup.
  • Why this matters

    • Ensures lock names used by reloadChecks() are always available, regardless of whether the framework has completed initialization.
    • Preserves first-run bootstrap safety by deferring application.applicationname access until bootstrap construction.
  • Regression coverage

    • Add focused specs for:
      • appHash being available immediately after bootstrap construction
      • reloadChecks() being callable before loadColdBox() has initialized the framework
// Before
function loadColdBox(){
	// appHash was not yet available here on early reloadChecks() paths
}

function reloadChecks(){
	lock name="#appHash#" ...
}

// After
function init(){
	variables.appHash = hash( getBaseTemplatePath() & application.applicationname )
}

function reloadChecks(){
	lock name="#appHash#" ...
}

Copilot AI changed the title [WIP] Fix appHash parameter initialization in reloadChecks Initialize Bootstrap appHash before reload checks Jun 26, 2026
Copilot AI requested a review from lmajano June 26, 2026 17:38
Comment thread system/Bootstrap.cfc Outdated
Copilot AI requested a review from lmajano June 26, 2026 17:44
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit cfbde0a. ± Comparison against base commit 545ac4e.

♻️ This comment has been updated with latest results.

@lmajano lmajano closed this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants