Skip to content

feat(project): implement resolve() + container template on FsTreeNode - #1946

Open
tejaskash wants to merge 3 commits into
refactorfrom
feat/project-resolve-templates
Open

feat(project): implement resolve() + container template on FsTreeNode#1946
tejaskash wants to merge 3 commits into
refactorfrom
feat/project-resolve-templates

Conversation

@tejaskash

@tejaskash tejaskash commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • implement ProjectManager.resolve() by locating and validating the nearest agentcore/agentcore.json
  • add the hello-world-python-container template and scaffold shared .gitignore and agentcore/.env.local files
  • return typed validation errors when project configuration is invalid or no project contains the current directory

Supersedes #1880 after the project schema and FsTreeNode scaffolding landed separately.

Testing

  • bun test (972 pass)

Locate an existing project by walking up to the agentcore/agentcore.json
marker, parse it through ProjectSpecSchema, and return { name, rootPath,
runtimes }. A malformed config surfaces as InputValidationError (user-
correctable) rather than a raw DeserializationError.

- extend Project with rootPath + runtimes (what withProject and the dev
  server actually consume)
- inject ReadWriteJson into FsProjectManager (tests read fixtures, not disk)
- create() returns the same shape resolve() would
…ed no-project error

- add hello-world-python-container template (Dockerfile + assets) and its
  TEMPLATES entry (build: Container, dockerfile). z.enum(PROJECT_TEMPLATES)
  exposes it as a --template choice automatically.
- fix fsTree renderName regex to rename dockerignore.template -> .dockerignore
  (previously only git/npm), so the container template's ignore file lands right.
- scaffold a root .gitignore and agentcore/.env.local from shared/ templates.
- withProject: throw InputValidationError when no project encloses the cwd,
  replacing the placeholder raw Error (unblocked by resolve()).
@codecov-commenter

codecov-commenter commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 95.75%. Comparing base (64058e3) to head (8b5334a).
⚠️ Report is 1 commits behind head on refactor.

Files with missing lines Patch % Lines
src/middleware/withProject.tsx 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #1946   +/-   ##
=========================================
  Coverage     95.74%   95.75%           
=========================================
  Files           291      291           
  Lines         16234    16273   +39     
=========================================
+ Hits          15544    15582   +38     
- Misses          690      691    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 7, 2026
@jariy17
jariy17 requested review from jariy17 and removed request for jariy17 August 7, 2026 17:43

@aidandaly24 aidandaly24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me! Very clean PR.

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.

4 participants