feat(FN-1492): fix workspace file operation route collision

- Fix Express route ordering where wildcard POST /files/{*filepath} was capturing operation routes
- Move operation routes (delete, copy, move, rename) before the generic write route to ensure proper matching
- Add missing ProjectEngine methods (getHeartbeatTriggerScheduler) for dashboard compatibility
- Add 189 regression tests verifying operation routes work correctly with nested paths
- Document Express wildcard route ordering pitfall in memory
This commit is contained in:
gsxdsm
2026-04-12 23:58:49 -07:00
parent ca87a96cb4
commit 79fdb691cf
4 changed files with 248 additions and 49 deletions

View File

@@ -244,6 +244,16 @@ export class ProjectEngine {
return this.runtime.getTaskStore();
}
/** Get the HeartbeatMonitor (if initialized). */
getHeartbeatMonitor() {
return this.runtime.getHeartbeatMonitor();
}
/** Get the project working directory. */
getWorkingDirectory(): string {
return this.config.workingDirectory;
}
/** Get the PrMonitor (if initialized). */
getPrMonitor(): PrMonitor | undefined {
return this.prMonitor;
@@ -259,16 +269,6 @@ export class ProjectEngine {
return this.automationStore;
}
/** Get the project's working directory. */
getWorkingDirectory(): string {
return this.config.workingDirectory;
}
/** Get the HeartbeatMonitor from the underlying runtime, if initialized. */
getHeartbeatMonitor(): HeartbeatMonitor | undefined {
return this.runtime.getHeartbeatMonitor();
}
/** Get the HeartbeatTriggerScheduler from the underlying runtime, if initialized. */
getHeartbeatTriggerScheduler(): HeartbeatTriggerScheduler | undefined {
return this.runtime.getTriggerScheduler();