Skip to content

examples: add harness overlay demo#778

Open
ewhauser wants to merge 6 commits into
mainfrom
ewhauser/harness-overlay-rebase
Open

examples: add harness overlay demo#778
ewhauser wants to merge 6 commits into
mainfrom
ewhauser/harness-overlay-rebase

Conversation

@ewhauser

Copy link
Copy Markdown
Owner

Summary

  • add the vendored Harness overlay example on top of current main
  • keep the vendored Harness launchers under examples/harness-overlay/workspace/bin tracked in git
  • allow that vendored bin/ path through the repo ignore rules so clean checkouts contain the upstream launcher scripts

Why

The jq/runtime issue that originally blocked this example is now fixed on main, so the harness branch can be rebased cleanly. After rebasing, the remaining failure was packaging: examples/harness-overlay/workspace/bin/harness and hs were missing from git because the repo-wide bin/ ignore pattern excluded them. That made the example fail immediately from a clean checkout even though the rest of the overlay was present.

Impact

This PR makes the Harness overlay example runnable from a normal checkout without the temporary local regeneration workaround that was previously needed to repopulate workspace/bin.

Validation

  • go test ./examples/harness-overlay
  • go run ./examples/harness-overlay --script './bin/harness help'

@ewhauser ewhauser changed the title [codex] examples: add harness overlay demo examples: add harness overlay demo Mar 29, 2026
@ewhauser ewhauser marked this pull request as ready for review March 29, 2026 13:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bee7c722fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/harness-overlay/workspace/.harness/commands/agent Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 22eecb1c71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/harness-overlay/workspace/.harness/commands/help Outdated
Comment thread examples/harness-overlay/workspace/plugins/subagents/tools/agent Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3aa93f561

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread examples/harness-overlay/workspace/.harness/hooks.d/receive/10-save Outdated
Comment thread examples/harness-overlay/update-harness.sh
@ewhauser ewhauser force-pushed the ewhauser/harness-overlay-rebase branch from b3aa93f to b759969 Compare March 29, 2026 23:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b75996916d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +171 to +175
cmd := osexec.CommandContext(
context.Background(),
filepath.Join(mustExampleDir(), "update-harness.sh"),
"--cache-dir", cacheDir,
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove live GitHub dependency from harness overlay tests

preparedWorkspaceForTests invokes update-harness.sh with its default upstream URL, so a clean test run requires reaching https://github.com/wedow/harness. In network-restricted or offline environments this command fails before either functional test runs, causing TestRunScriptHarnessHelp and TestOfflineHarnessLoopWithMockProvider to fail for infrastructure reasons rather than code behavior. This makes go test ./examples/harness-overlay non-hermetic and flaky; the fixture setup should use a local upstream (as done in TestUpdateHarnessScriptStagesPreparedWorkspace) instead of an external fetch.

Useful? React with 👍 / 👎.

Comment thread examples/Makefile
Comment on lines +20 to +22
@workspace="$$(./harness-overlay/update-harness.sh)"; \
echo "Running harness-overlay demo using $$workspace"; \
HARNESS_OVERLAY_WORKSPACE="$$workspace" go run ./harness-overlay

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop make target when workspace preparation fails

The run-harness-overlay recipe sequences commands with ;, so a failing ./harness-overlay/update-harness.sh does not stop the recipe and go run is still invoked with an empty HARNESS_OVERLAY_WORKSPACE. When workspace preparation fails (for example due to upstream fetch errors), this emits misleading follow-on errors and obscures the real failure point. The recipe should short-circuit on preparation failure (for example with && or explicit status checks).

Useful? React with 👍 / 👎.

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.

1 participant