Re-evaluate build-artifact gitignore protection after harness slimming

Open
#196 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
go

Research direction

Start in harness/cmd/migration-harness/main.go, especially the removed EnsureGitignore path and fetchAndWriteAnalysis. Review PR #186 and the base image or always-loaded rule options to decide which protection model is intended. Done means resolving the policy and ensuring .konveyor/ has ignore coverage, with the broader artifact behavior documented or implemented consistently.

Written by the indexing model from the issue text.

Description

Context

In PR #186 (slimming the harness to a minimal entry point), EnsureGitignore was removed from harness/cmd/migration-harness/main.go, and the harness no longer injects .gitignore entries for build artifacts before the agent runs.

Dylan Murray (@dymurray) flagged this in review:

Removing EnsureGitignore here drops the only guard against generated artifacts (.goose/, target/, node_modules/, build output) landing in commits. This matters more under the generic entry-point model, not less: a third-party operation/skill that runs git add -A instead of targeted adds will push build junk onto the branch. [...] consider keeping a minimal ignore write, or moving these patterns into a committed .gitignore in the base image / an always-loaded rule, rather than relying solely on skill prompt discipline. (Regression class previously fixed in changelog 92-skill-commit-hygiene / 110-skip-unnecessary-grounding-commit.)
— https://github.com/konveyor/agentic-controller/pull/186#discussion_r3874048353

He later added a follow-up on the same thread expressing uncertainty about his own concern:

Reviewing this comment I don't know if I agree with this; I'm skeptical this comment is correct
— https://github.com/konveyor/agentic-controller/pull/186#discussion_r3874085550

That follow-up went unanswered, so this is an open question rather than a settled ask.

Related: with the grounding commit and gitignore write both gone, .konveyor/analysis.json (written by fetchAndWriteAnalysis in harness/cmd/migration-harness/main.go) is now untracked with no ignore coverage. A broad git add -A from a skill would sweep it (and .konveyor/handoff.md) into a PR.

With both the grounding commit and the .gitignore write gone, .konveyor/analysis.json is now an untracked file with no ignore coverage. Fine within a single run (the agent reads it in-tree), but a broad add sweeps it — and .konveyor/handoff.md — into the PR. If grounding data is meant to stay entry-point-provided and never committed, add .konveyor/ to a committed ignore so accidental inclusion is impossible. Same root cause as the EnsureGitignore removal above.
— https://github.com/konveyor/agentic-controller/pull/186#discussion_r3874048362

Ask

Decide whether the entry point should:

  • Rely entirely on skill-authored .gitignore/targeted-add discipline (current state), or
  • Restore a minimal, committed ignore baseline (e.g. .konveyor/, .goose/, target/, node_modules/) in the base image or an always-loaded rule, so accidental inclusion via git add -A isn't possible.

At minimum, .konveyor/ should have ignore coverage regardless of the broader decision, since it's entry-point-provided data that's never meant to be committed.

Dominant language
Go
Stars
5
Forks
13
Avg merge
3d 6h
Merged PRs (30d)
47

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from konveyor/agentic-controller

All issues in konveyor/agentic-controller

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.