Repository navigation
fix(harness): answer the framework comments on the subfolder PR #248
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
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 |
|---|---|---|
|
|
@@ -76,7 +76,17 @@ | |
| "archive", | ||
| } | ||
| ) | ||
| _OTHER_SOURCE_SUFFIXES = (".ts", ".tsx", ".ipynb") | ||
| _OTHER_SOURCE_SUFFIXES = ( | ||
| ".ts", | ||
| ".tsx", | ||
| ".mts", | ||
| ".cts", | ||
| ".js", | ||
| ".jsx", | ||
| ".mjs", | ||
| ".cjs", | ||
| ".ipynb", | ||
| ) | ||
| _OTHER_SOURCE_NAME = "root_agent.yaml" | ||
|
|
||
| _VERSION_PATTERN = re.compile( | ||
|
|
@@ -911,9 +921,12 @@ def _decide(found: FolderFindings) -> tuple[str, str | None]: | |
| return "other", next(iter(labels)) | ||
| if labels: | ||
| return "unknown", None | ||
| # A chat model names LangChain only when nothing unseen could be building the agent. | ||
| if found.blockers: | ||
| return "unknown", None | ||
| if any(f.strength == "model" for f in found.findings): | ||
| return "langchain", "langchain" | ||
| if any(f.strength == "import" for f in found.findings) or found.blockers: | ||
| if any(f.strength == "import" for f in found.findings): | ||
| return "unknown", None | ||
| return "none", None | ||
|
|
||
|
|
@@ -1004,7 +1017,9 @@ def framework_folders_for( | |
| elif control_service: | ||
| for process in manifest.processes: | ||
| if process.name == control_service: | ||
| folder = bundle_dir / process.working_directory | ||
| # The same base the runtime builds the process from. | ||
| base = bundle_dir if process.source_origin == "bundle" else source | ||
|
Member
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. This is now the same rule as Optional, since two copies is still within the rule of three: a small method on
Member
Author
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. Agreed that the two copies can drift. I'd do this as a follow-up together with the typing comment: the method needs the tests' |
||
| folder = base / process.working_directory | ||
| break | ||
| package_dir = ( | ||
| work_directory / "build" / control_service if control_service else None | ||
|
|
||
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.
Not caused by this PR, but it now depends on it:
framework_folders_fortakesmanifest: Any(andjob: Any), soprocess.source_originandprocess.working_directoryare read with no type to check them against. A typo or a renamed field would only show up at runtime.The manifest is an
EnvironmentBundleV2, so typing the parameter as that would let a type checker see these reads. The tests passSimpleNamespacefakes, so they would need the real model or a cast. Fine as a follow-up.Uh oh!
There was an error while loading. Please reload this page.
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.
Agreed. I'd do this as a follow-up, together with the shared
SourceProcessmethod from the other comment, since both need the tests' fakes replaced by the real model. No change in this PR. I'm leaving the thread open until that's settled.