Skip to content

fix: repair bcos formula test block - #9

Open
pengshenghai wants to merge 1 commit into
Scottcjn:mainfrom
pengshenghai:codex/fix-bcos-test-write-file
Open

fix: repair bcos formula test block#9
pengshenghai wants to merge 1 commit into
Scottcjn:mainfrom
pengshenghai:codex/fix-bcos-test-write-file

Conversation

@pengshenghai

Copy link
Copy Markdown

Summary

  • replace the unsupported write_file call in the BCOS formula test block with Pathname#write
  • remove || true from test commands so brew test does not mask failures
  • compare the CLI version output with version.to_s instead of hard-coding 1.8.0

Scope

This only changes Formula/bcos.rb test-block behavior. It does not alter the tarball URL, SHA, install block, package source, or formula metadata.

Validation

  • ruby -c Formula/bcos.rb -> Syntax OK
  • git diff --check -- Formula/bcos.rb -> passed (Windows line-ending warning only)

I could not run brew test in this Windows workspace because Homebrew is not installed here.

AI assistance

Implemented with OpenAI Codex assistance after reading issue #8 and the current formula.

@Scottcjn

Copy link
Copy Markdown
Owner

Received, and queued for review — apologies for the silence up to now.

This is a maintainer-side backlog rather than any verdict on your contribution. We
had a large number of open PRs with no reply on them at all, which is our failure to
manage, not a signal about your work. Yours is in the queue and will get a real
review with a real decision.

I'm not going to give you a date I might miss. What I can tell you:

  • Reviews run oldest-first.
  • If this PR has gone stale against main, say so and I'll prioritise closing it so
    the queue reflects what you actually still want landed.
  • If you're submitting this for bounty credit, link the bounty issue in a comment —
    several contributions are eligible and we'd rather pay you than have you wonder.

Thanks for your patience, and for the work.

@Scottcjn

Copy link
Copy Markdown
Owner

Reviewed and merging — sorry it sat 66 days, that's on us. Verified by reading the diff: this removes the || true that made the bcos --help and bcos scan test assertions unable to fail (a test that can't fail is worse than no test), replaces the hardcoded "1.8.0" with version.to_s so the version assertion tracks the formula, and swaps the non-DSL write_file for (testpath/...).write. All three are correct and the change is scoped to the test block. Thank you.

@Scottcjn

Copy link
Copy Markdown
Owner

Correction: I went to merge and it has conflicts — the formula drifted in the 66 days this sat. The change itself is still correct and approved; it just needs a rebase onto current main first. @pengshenghai if you can rebase, we'll merge it right after. Apologies again for the wait.

Rebased onto main after Scottcjn#11 landed the Pathname#write fix; the three changes
that Scottcjn#11 did not cover:
- assert the formula's own version instead of a hard-coded "1.8.0"
- drop the '|| true' masks on 'bcos --help' and 'bcos scan' so a failing
  command fails the test (verified at clawrtc 1.8.0: both exit 0, help prints
  "BCOS", scan prints "Trust Score")
- trailing newline

Signed-off-by: Scott <scottbphone12@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Scottcjn
Scottcjn force-pushed the codex/fix-bcos-test-write-file branch from ad07321 to 9e5c81c Compare August 22, 2026 17:44
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.

2 participants