-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat(backend): build system backend generation #139
base: main
Are you sure you want to change the base?
Changes from 12 commits
83cd25b
accd1c0
da0f66c
7294fce
d4fc243
f99323e
68fece7
fcf30b0
609a0eb
754b3e0
4d1b641
51b3026
bdbd504
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,78 @@ | ||
import { isIntegrationTest } from 'src/common/utils'; | ||
import { BuildSequence } from '../types'; | ||
import { ProjectInitHandler } from '../handlers/project-init'; | ||
import { PRDHandler } from '../handlers/product-manager/product-requirements-document/prd'; | ||
import { UXSMDHandler } from '../handlers/ux/sitemap-document'; | ||
import { DBRequirementHandler } from '../handlers/database/requirements-document'; | ||
import { UXDMDHandler } from '../handlers/ux/datamap'; | ||
import { BuilderContext } from '../context'; | ||
import { DBSchemaHandler } from '../handlers/database/schemas/schemas'; | ||
import { BackendRequirementHandler } from '../handlers/backend/requirements-document'; | ||
import { BackendCodeHandler } from '../handlers/backend/code-generate'; | ||
|
||
(isIntegrationTest ? describe : describe.skip)('Build Sequence Test', () => { | ||
it('should execute build sequence successfully', async () => { | ||
const sequence: BuildSequence = { | ||
id: 'test-backend-sequence', | ||
version: '1.0.0', | ||
name: 'Wrtie a Cool personal website', | ||
description: | ||
'A personal blog website. I am a cybersecurity engineer so i want it to show i am a really cool hacker, with cool terminal functionality', | ||
databaseType: 'SQLite', | ||
model: 'gpt-4o-mini', | ||
projectSize: 'medium', // limit for fun | ||
nodes: [ | ||
{ | ||
handler: ProjectInitHandler, | ||
name: 'Project Folders Setup', | ||
}, | ||
{ | ||
handler: PRDHandler, | ||
name: 'Project Requirements Document Node', | ||
}, | ||
{ | ||
handler: UXSMDHandler, | ||
name: 'UX Sitemap Document Node', | ||
}, | ||
{ | ||
handler: UXDMDHandler, | ||
name: 'UX DataMap Document Node', | ||
}, | ||
{ | ||
handler: DBRequirementHandler, | ||
name: 'Database Requirements Node', | ||
// requires: ['op:UX:DATAMAP:DOC'], | ||
}, | ||
{ | ||
handler: DBSchemaHandler, | ||
name: 'Database schema Node', | ||
// requires: ['op:UX:DATAMAP:DOC'], | ||
}, | ||
{ | ||
handler: BackendRequirementHandler, | ||
name: 'Backend Requirements Node', | ||
// requires: ['op:DATABASE_REQ', 'op:UX:DATAMAP:DOC', 'op:UX:SMD'], | ||
}, | ||
// // { | ||
// // handler: BackendFileStructureAndArchitectureHandler, | ||
// // name: 'Backend File Structure and Architecture', | ||
// // }, | ||
{ | ||
handler: BackendCodeHandler, | ||
name: 'Backend Code Generator Node', | ||
}, | ||
// { | ||
// handler: BackendFileReviewHandler, | ||
// name: 'Backend File review Node', | ||
// }, | ||
// { | ||
// handler: FrontendCodeHandler, | ||
// name: 'Frontend Code Generator Node', | ||
// }, | ||
Comment on lines
+56
to
+71
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. 💡 Verification agent 🧩 Analysis chainConsider completing the test by uncommenting additional handlers. The test has several commented out handlers which suggests incomplete testing. Consider either uncommenting these handlers if they're meant to be part of the test or removing the commented code if they're not needed. 🏁 Script executed: #!/bin/bash
# Check if the commented handlers are implemented and available
echo "Checking if BackendFileStructureAndArchitectureHandler exists:"
find backend/src -name "*backend-file-struct*" -o -name "*backend-architecture*"
echo "Checking if BackendFileReviewHandler exists:"
find backend/src -name "*file-review*"
echo "Checking if FrontendCodeHandler exists:"
find backend/src -name "*frontend*code*" Length of output: 807 Action: Finalize test coverage for all handlers Our verification confirms that the implementations for the commented handlers exist in the repository. In the test file (backend/src/build-system/tests/backend-gen.spec.ts), aside from the active test for
To ensure comprehensive testing and maintain code clarity, please either:
|
||
], | ||
packages: [], | ||
}; | ||
const context = new BuilderContext(sequence, 'fullstack-code-gen'); | ||
await context.execute(); | ||
}, 2000000); | ||
}); |
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.
Fix import path error from pipeline failure.
The pipeline is failing with error:
TS2307: Cannot find module 'codefox-common' or its corresponding type declarations
. Check for the correct import path forisIntegrationTest
.📝 Committable suggestion
🧰 Tools
🪛 GitHub Actions: Run tests and upload coverage
[error] 4-4: TS2307: Cannot find module 'codefox-common' or its corresponding type declarations.