Skip to content

Enable pipefail for all runs from the Makefile#79

Merged
oskarszoon merged 14 commits into
bsv-blockchain:mainfrom
oskarszoon:bugfix/pipefile-tests
Nov 3, 2025
Merged

Enable pipefail for all runs from the Makefile#79
oskarszoon merged 14 commits into
bsv-blockchain:mainfrom
oskarszoon:bugfix/pipefile-tests

Conversation

@oskarszoon

@oskarszoon oskarszoon commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

This introduces proper pipefail usage across everything that runs from the Makefile.

Expected is that a few tests will now properly show their failing status in CI and will need to be fixed as part of this PR before this can be merged

@github-actions

github-actions Bot commented Oct 30, 2025

Copy link
Copy Markdown
Contributor

Review complete - no critical issues found. The PR enables pipefail and includes defensive fixes for race conditions in BlockAssembler (mutex protection for stateChangeCh, panic recovery for closed channels, cleanupQueueWorkerStarted check). Test helper waitForBlockAssemblyToProcessTx was refactored into TestDaemon with proper context timeout handling. Test assertions were updated to reflect actual behavior.

History: Fixed context timeout issue in WaitForBlockAssemblyToProcessTx previously reported.

sugh01 and others added 5 commits October 30, 2025 14:17
…ble method

- Add WaitForBlockAssemblyToProcessTx as public method on TestDaemon struct
- Replace loop counter with context-based timeout (2s) for better cancellation
- Use ticker and select-case pattern consistent with other wait methods
- Remove duplicate implementations from test files
- Update all test files to use td.WaitForBlockAssemblyToProcessTx()
Comment thread daemon/test_daemon.go Outdated
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2025

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
50.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@oskarszoon oskarszoon merged commit a6326cd into bsv-blockchain:main Nov 3, 2025
9 checks passed
oskarszoon added a commit to oskarszoon/teranode that referenced this pull request Jun 2, 2026
Address the open CodeQL code-scanning alerts:

- httpimpl: bound-check int->uint32 conversions before casting in
  GetBlocks (offset) and GetNearestForkHeights (range) to prevent
  truncation/wrap-around (go/incorrect-integer-conversion, bsv-blockchain#90 bsv-blockchain#91 bsv-blockchain#117)
- daemon: change formatBytes to take uint64, removing the unchecked
  int64(limit) narrowing of the cgroup memory limit (bsv-blockchain#113)
- dashboard p2pStore: reject __proto__/constructor/prototype peer_id
  keys before any plain-object write to prevent prototype pollution
  from WebSocket data (bsv-blockchain#79 bsv-blockchain#81 bsv-blockchain#83)
- dashboard urlUtils: remove the dead sanitizeUrl function entirely
  (no callers, no tests); its broken script-tag regex was the source
  of the alerts (js/bad-tag-filter, js/incomplete-multi-character-sanitization, bsv-blockchain#2 bsv-blockchain#4)
- centrifuge client: use textContent instead of innerHTML in drawText
  to fix DOM XSS from server-controlled push data (bsv-blockchain#1)
- grpc_helper: document that SecurityLevel 1 leaves the server cert
  unverified (MITM); behaviour unchanged, bsv-blockchain#42 is an intentional
  config-gated mode dismissed on GitHub
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.

3 participants