-
Notifications
You must be signed in to change notification settings - Fork 567
Add self-review, auto-merge, failure recovery, and board enhancements #763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
25f28d7
2f06db1
3d15732
a47cd04
cf479e8
12df9eb
0a77f78
2b46a92
93ccba2
36fcb3f
efd760f
406bcff
49b0507
e4d3525
ea5bc41
3eb497f
c162dfd
72f9e37
bff306f
88fc610
cdd10d2
4eb1354
3a3ea97
474e6f7
49c78af
95ed903
2a82729
8235429
ac6732d
c337154
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,88 @@ | ||||||||||
| import type { Request, Response } from 'express'; | ||||||||||
| import express from 'express'; | ||||||||||
|
|
||||||||||
| import { resolveModelString, resolvePhaseModel } from '@automaker/model-resolver'; | ||||||||||
| import { DEFAULT_MODELS } from '@automaker/types'; | ||||||||||
| import type { SettingsService } from '../../services/settings-service.js'; | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * Debug routes (authenticated) | ||||||||||
| * | ||||||||||
| * These endpoints are intended for local verification and troubleshooting. | ||||||||||
| * Do not return secrets. | ||||||||||
| */ | ||||||||||
| export function createDebugRoutes(settingsService: SettingsService) { | ||||||||||
| const router = express.Router(); | ||||||||||
|
|
||||||||||
| /** | ||||||||||
| * Return the raw configured model keys and their resolved effective model IDs. | ||||||||||
| * | ||||||||||
| * This is the authoritative source for "which model will be used" because it uses | ||||||||||
| * the same resolver as agent runs. | ||||||||||
| */ | ||||||||||
| router.get('/resolved-models', async (_req: Request, res: Response) => { | ||||||||||
| const settings = await settingsService.getGlobalSettings(); | ||||||||||
|
|
||||||||||
| const defaultFeatureModelKey = settings.defaultFeatureModel?.model; | ||||||||||
|
|
||||||||||
| const phaseModels = settings.phaseModels || ({} as any); | ||||||||||
|
|
||||||||||
| const specGeneration = resolvePhaseModel( | ||||||||||
| phaseModels.specGenerationModel, | ||||||||||
| DEFAULT_MODELS.claude | ||||||||||
| ); | ||||||||||
| const backlogPlanning = resolvePhaseModel( | ||||||||||
| phaseModels.backlogPlanningModel, | ||||||||||
| DEFAULT_MODELS.claude | ||||||||||
| ); | ||||||||||
| const validation = resolvePhaseModel(phaseModels.validationModel, DEFAULT_MODELS.claude); | ||||||||||
|
|
||||||||||
| // Also show what the legacy "validationModel" / "enhancementModel" shortcuts are set to (if present) | ||||||||||
| const legacyValidationModelKey = (settings as any).validationModel; | ||||||||||
| const legacyEnhancementModelKey = (settings as any).enhancementModel; | ||||||||||
|
Comment on lines
+41
to
+42
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using
Suggested change
|
||||||||||
|
|
||||||||||
| const result = { | ||||||||||
| now: new Date().toISOString(), | ||||||||||
| defaults: { | ||||||||||
| DEFAULT_MODELS, | ||||||||||
| }, | ||||||||||
| configured: { | ||||||||||
| defaultFeatureModelKey, | ||||||||||
| phaseModels: { | ||||||||||
| specGenerationModel: phaseModels.specGenerationModel, | ||||||||||
| backlogPlanningModel: phaseModels.backlogPlanningModel, | ||||||||||
| validationModel: phaseModels.validationModel, | ||||||||||
| }, | ||||||||||
| legacy: { | ||||||||||
| validationModelKey: legacyValidationModelKey, | ||||||||||
| enhancementModelKey: legacyEnhancementModelKey, | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| resolved: { | ||||||||||
| defaultFeatureModel: { | ||||||||||
| key: defaultFeatureModelKey, | ||||||||||
| resolved: resolveModelString(defaultFeatureModelKey, DEFAULT_MODELS.claude), | ||||||||||
| }, | ||||||||||
| phaseModels: { | ||||||||||
| specGenerationModel: specGeneration, | ||||||||||
| backlogPlanningModel: backlogPlanning, | ||||||||||
| validationModel: validation, | ||||||||||
| }, | ||||||||||
| legacy: { | ||||||||||
| validationModel: { | ||||||||||
| key: legacyValidationModelKey, | ||||||||||
| resolved: resolveModelString(legacyValidationModelKey, DEFAULT_MODELS.claude), | ||||||||||
| }, | ||||||||||
| enhancementModel: { | ||||||||||
| key: legacyEnhancementModelKey, | ||||||||||
| resolved: resolveModelString(legacyEnhancementModelKey, DEFAULT_MODELS.claude), | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| }, | ||||||||||
| }; | ||||||||||
|
|
||||||||||
| res.json(result); | ||||||||||
| }); | ||||||||||
|
Comment on lines
+23
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: In Express 4, an Option A (Express 4): wrap and forward to
|
||||||||||
|
|
||||||||||
| return router; | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ import { createLogger } from '@automaker/utils'; | |
| const logger = createLogger('features/update'); | ||
|
|
||
| // Statuses that should trigger syncing to app_spec.txt | ||
| const SYNC_TRIGGER_STATUSES: FeatureStatus[] = ['verified', 'completed']; | ||
| const SYNC_TRIGGER_STATUSES: FeatureStatus[] = ['verified', 'done', 'completed']; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stale inline comment on Line 74. The comment on Line 74 says "verified or completed" but 📝 Suggested fix- // Trigger sync to app_spec.txt when status changes to verified or completed
+ // Trigger sync to app_spec.txt when status changes to verified, done, or completed🤖 Prompt for AI Agents |
||
|
|
||
| export function createUpdateHandler(featureLoader: FeatureLoader) { | ||
| return async (req: Request, res: Response): Promise<void> => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
as anybypasses type safety. Sincesettings.phaseModelscan beundefined, using the nullish coalescing operator?? {}is a safer way to provide a default empty object. The properties onphaseModelscan then be accessed with optional chaining (e.g.,phaseModels?.specGenerationModel), whichresolvePhaseModelalready handles gracefully forundefinedinputs.