Chore: remove stray output.txt from the repo root - #271
Open
AmaadMartin wants to merge 1 commit into
Open
Conversation
The 5-byte file output.txt (contents: "hello") was committed accidentally in 8d5cc0a (google#276) as leftover scratch output from developing the skill script-execution tools: materializeFiles writes agent-produced output files into process.cwd() by default, so exercising the tools from the repo root materialized the sample output into the working tree. Nothing reads or writes the path. A repo-wide grep finds the string only in in-memory test fixtures whose file_utils module is mocked (run_skill_script_tool_test.ts, run_skill_inline_script_tool_test.ts) and in unsafe_local_code_executor_test.ts, which writes new_output.txt into a mkdtemp temporary directory. No build, test, lint, docs, packaging, or CI step references it.
This was referenced Jul 30, 2026
Open
Fix: persist skill script output files to the artifact service instead of the agent process cwd
#410
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
No existing issue.
Problem: A 5-byte file named
output.txt(contents: the literal texthello, no trailing newline) is tracked at the repository root. It is scratch output that was committed by accident in8d5cc0ac("feat: skills: support script execution", feat: skills: support script execution google/adk-js#276) and has never been touched since —git log -- output.txtshows exactly one commit. It plays no role in the build, the test suite, packaging, documentation, or CI, yet every fresh clone of the SDK ships it, and anyone exercising the skill script-execution tools from the repo root gets confusinggit statusnoise against it.Background on how it got committed (context only — no behavioural fix is in scope):
materializeFilesincore/src/utils/file_utils.tswrites agent-produced output files intoprocess.cwd()by default. Manually running the new script-execution tools from the repo root during development of google#276 materialized the executor's sample output file into the working tree, where it was swept into the commit. That is the documented, intended behaviour ofmaterializeFiles— it is how a skill script's output reaches the user's working directory — so it is deliberately not changed here.Solution:
git rm output.txt. That is the entire diff: 1 file changed, 1 deletion(-). Deletion alone is the correct and complete fix — deliberately not done here:.gitignoreentry.output.txtis a generic name that a legitimate, deliberately materialized skill-script output could use; blanket-ignoring it at the repo root would silently hide such a file from a future contributor. The safety audit below shows nothing writes it, so there is nothing to ignore.materializeFilesor itsdir = process.cwd()default — that would be a behavioural change to the skills feature, with its own compatibility analysis.8d5cc0ac; a normal forward deletion is what is wanted.Safety audit — does anything depend on the path?
grep -rn "output\.txt" . --exclude-dir=.gitreturns exactly four matches in three files, all verified to be unrelated to the tracked repo-root file, and all left untouched by this PR:core/test/tools/skills/run_skill_script_tool_test.ts:210— an in-memoryFileobject literal used as a fake executor result;../../../src/utils/file_utils.jsisvi.mocked at the top of the file, so the real writer never runs and nothing hits disk.core/test/tools/skills/run_skill_inline_script_tool_test.ts:226— same pattern, same module-levelvi.mock.core/test/code_executors/unsafe_local_code_executor_test.ts:269,286— the executed snippet writesnew_output.txt(a different filename), andUnsafeLocalCodeExecutormaterializes into amkdtemptemp directory, never the repo root.core/test/utils/file_utils_test.ts— the only caller of the realmaterializeFiles; every call passes an explicitmkdtempdirectory that is removed inafterEach, and it never uses the nameoutput.txt.No source file, script, config, workflow, packaging manifest, or doc reads or writes the repo-root
output.txt.scripts/check_license.shonly scans*.js/*.ts;vitest.config.tscoverageincludeis limited to*/src/**/*.ts, so the absolute coverage thresholds are mathematically unaffected;.prettierignoreand thelint-stagedglobs do not match.txt;npx secretlint "**/*"simply has one fewer file to scan and.secretlintrc.jsonneeds no change.Collision check: all 534 open PRs on the staging fork were re-listed (
gh pr list --limit 1000) and every plausibly adjacent PR's file list inspected (gh pr diff <n> --name-only).Seven PRs now also delete
output.txt. All seven were opened after this one (#271, 2026-07-29T21:12:36Z), which is the earliest and the only one whose diff is nothing but the deletion:fix/remove-stray-root-output-txtgh pr diff) — a pure duplicate. It previously also added a.gitignoreblock; that has since been dropped.fix/delete-root-output-txt-artifactfix/drop-stray-root-output-txt-filefix/remove-stray-root-output-txt-artifacttests/integration/tools/skill-script suites.fix/skill-script-explicit-output-dirfix/skill-script-outputs-to-artifact-servicefix/skill-script-output-dir-containmentResolution — deliberately not stacked, and not withdrawn. Stacking a one-line hygiene deletion onto a behavioural refactor (#353, #410, #438, #556) would make a trivially reviewable change wait on a hard one and would invert the dependency: the deletion does not need any of them. Nor is there anything to stack onto for the three exact duplicates. These all reconcile automatically in any merge order — whichever lands first, the others drop the hunk on their next rebase and this PR becomes an empty diff that should simply be closed. Reviewers wanting the bundled route can close this one at no cost; reviewers wanting the minimal, isolated change should prefer this one and close the rest.
On the
.gitignorequestion: the entry is deliberately omitted here.output.txtis a generic name a legitimate, deliberately materialized skill-script output could use, so ignoring it at the repo root would silently hide such a file from a future contributor — and ignoring the artifact is a band-aid on one filename, whereas the durable fix is to stopmaterializeFilesdefaulting toprocess.cwd()(the subject of the separate PRs below).The remaining adjacent PRs all address that cause rather than this already-committed artifact, and none of them touches
output.txt, so they are file-disjoint from this diff:fix/materialize-files-no-mutate-bounded-collisions) —file_utils.ts,unsafe_local_code_executor.tsand their tests.fix/file-utils-path-containment) and Fix: enforce path containment by segment, not string prefix, in materializeFiles #523 (fix/file-utils-path-containment-check) —core/src/utils/file_utils.tsand its test.fix/skill-tools-declared-output-dir) — 7 files undercore/src/tools/skill/,core/src/utils/file_utils.tsand their tests.fix/skill-script-output-dir) — makes the skill script output directory configurable, 11 files undercore/src/tools/skill/,core/src/utils/file_utils.ts, and their tests.feat/skill-script-output-artifacts) — 11 files persisting skill script outputs through the artifact service, undercore/src/artifacts/,core/src/tools/skill/,core/src/utils/artifact_utils.tsand their tests.fix/skill-script-test-artifact-leak) — 2 files undertests/integration/tools/.feat/run-skill-script-error-code-enum) and Fix: give Windows PowerShell/CMD skill-script tests an explicit vitest timeout #210 (fix/windows-powershell-skill-script-test-timeout) — unrelated to the output path.Those PRs stop new artifacts from appearing; this PR removes the one already committed.
Not a breaking change.
output.txtis not part of any package's public API, not referenced by anyfiles/exportsentry, not imported by any module, not loaded by any fixture, and not consumed by any CI step. No consumer of@google/adkcan observe its removal. The commit ischore:so release-please produces no release note, and noCHANGELOG.mdis hand-edited.Testing Plan
Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes.
Unit Tests:
[x] I have added or updated unit tests for my change. — N/A, intentionally. This change adds zero lines of code, so new-line coverage is vacuously satisfied (0/0), and there is no behaviour to pin. The "prove the test can fail" requirement likewise has no subject: a mutation test requires a test, and the only test one could write here (
!fs.existsSync('output.txt')) is a cwd-dependent assertion about the checkout rather than about the SDK, and would violate the one-file diff invariant. Instead, the existing tests that so much as mention the string were run before and after the deletion and produced byte-identical results (below).[x] All unit tests pass locally.
Targeted run of every test file that mentions
output.txt(only targeted tests were run, per the repo guidance):Result after the deletion:
Test Files 4 passed (4),Tests 39 passed (39).Result before the deletion (same worktree with
output.txtrestored, i.e. the base state):Test Files 4 passed (4),Tests 39 passed (39)— identical, confirming the safety audit empirically.CI-equivalent checks, all on the pushed commit:
npm run buildnpx vitest run --project unit:core <4 files above>npm run lintnpm run format:checknpm run docs:checknpx secretlint "**/*"bash scripts/check_license.shnpm run ts:checkreports 48 pre-existing error locations, all undertests/integration/**andcore/test/**, and reports exactly the same 48 withoutput.txtrestored — they are untouched by this PR and out of scope (.github/workflows/validation.yamldoes not runts:check; separate in-flight PRs address it).Manual End-to-End (E2E) Tests:
Please provide instructions on how to manually test your changes, including any necessary setup or configuration.
On a clean checkout of this branch:
ls output.txt→No such file or directory.git ls-files output.txt→ prints nothing (untracked).git show --stat HEAD→ exactlyoutput.txt | 1 -/1 file changed, 1 deletion(-).git status --porcelain→ empty.git status --porcelainagain → still empty, proving the test suite does not regenerateoutput.txtin the repo root. This was run and confirmed.grep -rn "output\.txt" . --exclude-dir=.git --exclude-dir=node_modules→ only the four in-memory test-fixture matches enumerated above, all unchanged.Checklist
[x] I have read the CONTRIBUTING.md document.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas. — N/A; the change is a file deletion, the rationale is in the commit message and above.
[x] I have added tests that prove my fix is effective or that my feature works. — N/A as explained under Unit Tests; verified instead via the before/after targeted runs and the direct postcondition checks.
[x] New and existing unit tests pass locally with my changes.