Commit graph

296 commits

Author SHA1 Message Date
openhands
61b7ee435f chore: remove unused pt-v5-twab-controller submodule (54MB) 2026-02-13 14:37:20 +00:00
openhands
d581b8394b fix(onchain): resolve KRK token supply corruption during recenter (#98)
PROBLEM:
Recenter operations were burning ~137,866 KRK tokens instead of minting
them, causing severe deflation when inflation should occur. This was due
to the liquidity manager burning ALL collected tokens from old positions
and then minting tokens for new positions separately, causing asymmetric
supply adjustments to the staking pool.

ROOT CAUSE:
During recenter():
1. _scrapePositions() collected tokens from old positions and immediately
   burned them ALL (+ proportional staking pool adjustment)
2. _setPositions() minted tokens for new positions (+ proportional
   staking pool adjustment)
3. The burn and mint operations used DIFFERENT totalSupply values in
   their proportion calculations, causing imbalanced adjustments
4. When old positions had more tokens than new positions needed, the net
   result was deflation

WHY THIS HAPPENED:
When KRK price increases (users buying), the same liquidity depth
requires fewer KRK tokens. The old code would:
- Burn 120k KRK from old positions (+ 30k from staking pool)
- Mint 10k KRK for new positions (+ 2.5k to staking pool)
- Net: -137.5k KRK total supply (WRONG!)

FIX:
1. Modified uniswapV3MintCallback() to use existing KRK balance first
   before minting new tokens
2. Removed burn() from _scrapePositions() - keep collected tokens
3. Removed burn() from end of recenter() - don't burn "excess"
4. Tokens held by LiquidityManager are already excluded from
   outstandingSupply(), so they don't affect staking calculations

RESULT:
Now during recenter, only the NET difference is minted or used:
- Collect old positions into LiquidityManager balance
- Use that balance for new positions
- Only mint additional tokens if more are needed
- Keep any unused balance for future recenters
- No more asymmetric burn/mint causing supply corruption

VERIFICATION:
- All 107 existing tests pass
- Added 2 new regression tests in test/SupplyCorruption.t.sol
- testRecenterDoesNotCorruptSupply: verifies single recenter preserves supply
- testMultipleRecentersPreserveSupply: verifies no accumulation over time

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:20:57 +00:00
johba
e5e1308e72 refactor: consolidate CI and local dev orchestration (#108)
## Summary
- Extract shared bootstrap functions into `scripts/bootstrap-common.sh` (eliminates ~120 lines of duplicated forge/cast commands from e2e.yml)
- Create reusable `scripts/wait-for-service.sh` for health checks (replaces 60-line inline wait-for-stack)
- Merge dev and CI entrypoints into unified scripts branching on `CI` env var (delete `docker/ci-entrypoints/`)
- Replace 4 per-service CI Dockerfiles with parameterized `docker/Dockerfile.service-ci`
- Add `sync-tax-rates.mjs` to CI image builder stage
- Fix: CI now grants txnBot recenter access (was missing)
- Fix: txnBot funding parameterized (CI=10eth, local=1eth)
- Delete 5 obsolete migration docs and 4 DinD integration files

Net: -1540 lines removed

Closes #107

## Test plan
- [ ] E2E pipeline passes (bootstrap sources shared script, services use old images with commands override)
- [ ] build-ci-images pipeline builds all 4 services with unified Dockerfile
- [ ] Local dev stack boots via `./scripts/dev.sh start`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/108
2026-02-03 12:07:28 +01:00
johba
4277f19b68 feature/ci (#84)
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/84
2026-02-02 19:24:57 +01:00
traddoo
beefe22f90 fix(web-app): position ID, issuance earned (#96)
Bug #1: Position ID Transformation Issue (#95)

  Problem: Frontend applied incorrect byte conversion to position IDs, causing transactions to fail with "NoPermission"
  errors.

  Root Cause: formatId() function did little-endian byte conversion on already-correct numeric strings from GraphQL.

  Fix: Direct conversion BigInt(obj.id) instead of formatId(obj.id as Hex) in usePositions.ts.

  Result: Users can now successfully stake/unstake positions.

  ---
  Bug #2: Issuance Earned Calculation Error (#97)

  Problem: Frontend showed negative "Issuance Earned" values (e.g., -4,991 KRK) due to wrong mathematical formula.

  Root Cause: Formula calculated position.totalSupplyInit - currentTotalSupply (always negative when supply increases).

  Fix: Correct formula (currentTotalSupply - position.totalSupplyInit) × position.share in Vue components.

  Result: Shows realistic positive earnings and enables proper economic monitoring.

Co-authored-by: steve <steve@harberg.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/96
Co-authored-by: traddoo <traddoo@noreply.codeberg.org>
Co-committed-by: traddoo <traddoo@noreply.codeberg.org>
2025-11-20 19:44:10 +01:00
johba
a555a2fdd1 refactor: migrate kraiken-lib to explicit subpath imports (BREAKING CHANGE) (#89)
Removes the barrel export pattern in favor of explicit subpath imports
for better tree-shaking and clearer dependencies.

## Breaking Changes
- Removed `src/helpers.ts` barrel export
- Removed `./helpers` from package.json exports
- Root `kraiken-lib` import now raises build errors
- Consumers MUST use explicit subpaths:
  - `kraiken-lib/abis` - Contract ABIs
  - `kraiken-lib/staking` - Staking helpers
  - `kraiken-lib/snatch` - Snatch selection
  - `kraiken-lib/ids` - Position ID utilities
  - `kraiken-lib/subgraph` - Byte conversion utilities
  - `kraiken-lib/taxRates` - Tax rate constants
  - `kraiken-lib/version` - Version validation

## Changes
- kraiken-lib:
  - Bumped version to 1.0.0 (breaking change)
  - Updated src/index.ts to raise build errors
  - Added backward-compatible ABI aliases (KraikenAbi, StakeAbi)
  - Updated all test files to use .js extensions and new imports
  - Updated documentation (README, AGENTS.md)

- Consumer updates:
  - services/ponder: Updated ponder.config.ts to use kraiken-lib/abis
  - web-app: Updated all imports to use subpaths
    - composables/usePositions.ts: kraiken-lib/subgraph
    - contracts/harb.ts: kraiken-lib/abis
    - contracts/stake.ts: kraiken-lib/abis

## Migration Guide
```typescript
// OLD
import { getSnatchList } from 'kraiken-lib/helpers';
import { KraikenAbi } from 'kraiken-lib';

// NEW
import { getSnatchList } from 'kraiken-lib/snatch';
import { KraikenAbi } from 'kraiken-lib/abis';
```

Fixes #86

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/89
2025-11-20 18:54:53 +01:00
johba
1c6f118f6b fix/node-modules-named-volumes (#94)
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/94
2025-11-13 18:17:56 +01:00
johba
19bac420d0 fix/docker-log-rotation-disk-management (#93)
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/93
2025-11-09 12:57:49 +01:00
johba
5d71753086 migrate/podman-to-docker (#92)
podman to docker

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/92
2025-11-08 14:08:46 +01:00
johba
c2720c35a5 fix: configure Jest for ES modules in kraiken-lib (#88)
Updates Jest configuration to properly handle ES module syntax:
- Switch to ts-jest/presets/default-esm preset
- Add custom resolver to map .js imports to .ts source files
- Configure extensionsToTreatAsEsm for TypeScript files
- Enable useESM in ts-jest globals

This resolves module resolution errors when running tests in
kraiken-lib which uses "type": "module" in package.json.

Fixes #85

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/88
2025-11-08 12:03:48 +01:00
johba
07a522e3fb Merge pull request 'fix: correct ProcessEnv type import in txnBot' (#91) from fix/txnbot-processenv-type into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/91
2025-11-08 11:58:49 +01:00
openhands
a8786f6460 fix: correct ProcessEnv type import in txnBot
Changes ProcessEnv import from non-existent 'node:process' module
to use built-in NodeJS.ProcessEnv type.

Fixes TypeScript compilation error:
  Module '"node:process"' has no exported member 'ProcessEnv'

Also adds NodeJS to ESLint globals to resolve no-undef warning.

All services now healthy and operational.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 10:39:27 +00:00
johba
9852e55d40 Merge pull request 'config: add configurable RPC timeout for Ponder stability' (#90) from config/ponder-rpc-timeout into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/90
2025-11-06 12:27:13 +01:00
openhands
3564a36408 config: add configurable RPC timeout for Ponder stability
Adds PONDER_RPC_TIMEOUT environment variable to improve Ponder
stability on slow RPC connections or under load. Default is 20000ms
(20 seconds).

## Changes
- containers/ponder-dev-entrypoint.sh: Export PONDER_RPC_TIMEOUT with default of 20000ms
- podman-compose.yml: Add PONDER_RPC_TIMEOUT to ponder service environment

## Configuration
The timeout can be overridden by setting PONDER_RPC_TIMEOUT in your
environment before starting the stack:
```bash
export PONDER_RPC_TIMEOUT=30000  # 30 seconds
./scripts/dev.sh start
```

## Impact
- Low risk: Configuration-only change
- No breaking changes
- Improves stability on slower networks or forked environments
- Defaults to 20 seconds if not specified

Fixes #87

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-06 08:58:31 +00:00
johba
c8162b2f3f Merge pull request 'fill stake e2e' (#82) from feature/e2e-max-stake-test into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/82
2025-10-12 10:35:38 +02:00
johba
aa1ddfcecd fill stake e2e 2025-10-11 17:54:49 +00:00
johba
30ed4aa072 Merge pull request 'feat: surface stack versions in app footer' (#81) from feature/expose-stack-versions into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/81
2025-10-11 19:22:46 +02:00
johba
d8119da65b feat: surface stack versions in app footer 2025-10-11 17:21:45 +00:00
johba
beea5f67f9 Merge pull request 'feature/txn-bot-service-refactor' (#80) from feature/txn-bot-service-refactor into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/80
2025-10-11 17:50:00 +02:00
johba
f039221d4a txnbot refactor 2025-10-11 15:47:16 +00:00
johba
bd475c2271 min stake from backend (#78)
resolves #74

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/78
2025-10-11 15:30:08 +02:00
johba
0b3545091f Merge pull request 'position stream' (#77) from feature/ponder-position-stream into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/77
2025-10-11 14:35:58 +02:00
johba
55321eff65 position stream 2025-10-11 12:33:35 +00:00
johba
0674648044 Merge pull request 'improve web-app config' (#76) from fix/rpc-api-paths into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/76
2025-10-11 12:57:23 +02:00
johba
371a8557b7 improve web-app config 2025-10-11 10:55:49 +00:00
johba
280e2973cd Merge pull request 'reworked stack' (#71) from feature/stake-accessibility into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/71
2025-10-07 23:59:34 +02:00
johba
f7ef56f65f reworked stack 2025-10-07 21:57:32 +00:00
johba
6cbb1781ce tax rate, version and compose (#70)
resolves #67

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/70
2025-10-07 19:26:08 +02:00
johba
d8ca557eb6 Merge pull request 'cleanup' (#69) from cleanup into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/69
2025-10-07 15:09:10 +02:00
johba
c3d2a50804 cleanup 2025-10-07 13:08:21 +00:00
johba
8cd64e808f feat: Add test helper for E2E staking flow (#66)
Implements window.__testHelpers.fillStakeForm() to enable stable E2E testing
of the staking form without fragile UI selectors.

## Changes

- Add window.__testHelpers interface (dev mode only)
- Implement fillStakeForm() in StakeHolder.vue with input validation
- Add TypeScript declarations in env.d.ts
- Update E2E test to use helper and verify full user journey
- Create INTEGRATION_TEST_STATUS.md documenting test coverage
- Document helper in web-app/README.md

## Test Coverage

Playwright E2E now validates complete flow:
- Mint ETH via cheats page UI
- Swap KRK via cheats page UI
- Stake KRK via stake page UI (helper + click)
- Verify position via GraphQL

Both Playwright and verify-swap.sh tests now work independently.

resolves #62

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/66
2025-10-07 15:06:38 +02:00
johba
b1f40374cd feat: Add functional health checks for test prerequisites (#65)
Replaces basic "service is up" checks with functional verification that tests can actually use the services.

## Changes

### New Health Checks
- **RPC Proxy**: Verifies eth_call works and deployed contracts are accessible
- **GraphQL**: Confirms Ponder has indexed data with non-zero stats
- **Web App**: Validates endpoint accessibility

### Improvements
- Clear error messages explain what failed and how to fix it
- Checks verify actual functionality, not just HTTP 200 responses
- Fails fast before tests run with cryptic errors

### Files
- `tests/setup/health-checks.ts` - Core health check functions
- `tests/setup/stack.ts` - Integration with waitForStackReady()
- `tests/HEALTH_CHECKS.md` - Documentation and troubleshooting guide

## Error Message Example

Before:
```
RPC health check failed with status 404
```

After:
```
 Stack health check failed

Failed services:
  • RPC Proxy: RPC proxy returned HTTP 404
    Expected 200, got 404. Check if Anvil is running and RPC_URL is correct.
  • GraphQL Indexer: GraphQL has no indexed data yet
    Ponder is running but has not indexed contract events.

Troubleshooting:
  1. Check stack logs: tail tests/.stack.log
  2. Verify services are running: ./scripts/dev.sh status
  3. Restart stack: ./scripts/dev.sh restart --full
```

## Benefits
-  Tests fail fast with clear error messages
-  Catches configuration issues before tests run
-  Verifies services are actually usable, not just running

resolves #61

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/65
2025-10-05 20:03:07 +02:00
johba
1645865c5a first integration tests (#64)
resolves #60

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/64
2025-10-05 19:40:14 +02:00
johba
d6f0bf4f02 ponder speedup (#59)
Successfully applied and tested the bootstrap speedup optimizations. Here's what was accomplished:                                                                                                                                                                                                  Fixes Applied
                                                                                                                                                    1. podman-compose.yml - Changed ponder dependency from service_started to service_completed_successfully to eliminate race condition
  2. services/ponder/src/helpers/stats.ts - Fixed two context errors:                                                                                 - Used START_BLOCK from environment instead of context.network.contracts.Kraiken.startBlock                                                       - Added console fallback for context.logger (undefined in block handlers)
  Test Results                                                                                                                                                                                                                                                                                        Core Services:  All Healthy                                                                                                                     - Anvil (blockchain): Running, healthy                                                                                                            - Postgres (database): Running, healthy
  - Ponder (indexer): Running, healthy                                                                                                              - Bootstrap: Completed successfully (exit code 0)                                                                                                                                                                                                                                                   GraphQL API:  Working                                                                                                                           {"data":{"stats":{"kraikenTotalSupply":"413226953999797390248016","outstandingStake":"0"}}}
                                                                                                                                                    Bootstrap Optimizations:  Confirmed
  -  Reduced mining from 2000 to 200 blocks                                                                                                       -  Batch mining support (anvil_mine RPC)                                                                                                        -  Dependency caching with marker files                                                                                                         -  Ponder waits for bootstrap completion (no more stale .env.local issues)                                                                                                                                                                                                                        Timing: Bootstrap completes in ~20 seconds (vs 90+ seconds previously - approximately 75% faster)
                                                                                                                                                    The optimization branch is working correctly. The core issue (ponder race condition) has been fixed and ponder now successfully queries           contract data after bootstrap completes.

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/59
2025-10-04 18:08:10 +02:00
johba
514be62cbb txnbot - rewrite and lint (#53)
resolves #46

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/53
2025-10-04 15:40:30 +02:00
johba
dc61771dfc feat(ponder): Add strict ESLint + Prettier with pre-commit hooks (#52)
- Install eslint, @typescript-eslint plugins, prettier, husky, lint-staged
- Configure ESLint flat config with TypeScript parser
- Enforce: no-explicit-any (with exceptions), no-unused-vars, naming-convention, prefer-const, no-console
- Set style: 2-space indent, 140 char max-len, disable complexity rules
- Configure Prettier: single quotes, 140 width, trailing commas
- Setup husky pre-commit hook to auto-fix and format on commit
- Replace console.log/warn with context.logger.info/warn in handlers
- Remove console.log from ponder.config.ts (replaced with comment)
- Add npm scripts: lint, lint:fix, format, format:check
- All lint rules pass without warnings

resolvel #45

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/52
2025-10-04 15:37:26 +02:00
johba
c150b683c8 Merge pull request 'Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks' (#57) from lint/onchain into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/57
2025-10-04 15:18:56 +02:00
johba
d7c2184ccf Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks (#51)
## Changes

### Configuration
- Added .solhint.json with recommended rules + custom config
  - 160 char line length (warn)
  - Double quotes enforcement (error)
  - Explicit visibility required (error)
  - Console statements allowed (scripts/tests need them)
  - Gas optimization warnings enabled
  - Ignores test/helpers/, lib/, out/, cache/, broadcast/

- Added foundry.toml [fmt] section
  - 160 char line length
  - 4-space tabs
  - Double quotes
  - Thousands separators for numbers
  - Sort imports enabled

- Added .lintstagedrc.json for pre-commit auto-fix
  - Runs solhint --fix on .sol files
  - Runs forge fmt on .sol files

- Added husky pre-commit hook via lint-staged

### NPM Scripts
- lint:sol - run solhint
- lint:sol:fix - auto-fix solhint issues
- format:sol - format with forge fmt
- format:sol:check - check formatting
- lint / lint:fix - combined commands

### Code Changes
- Added explicit visibility modifiers (internal) to constants in scripts and tests
- Fixed quote style in DeployLocal.sol
- All Solidity files formatted with forge fmt

## Verification
-  forge fmt --check passes
-  No solhint errors (warnings only)
-  forge build succeeds
-  forge test passes (107/107)

resolves #44

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/51
2025-10-04 15:17:09 +02:00
johba
7961bfdada Add Solidity linting with solhint, Foundry formatter, and pre-commit hooks
- Added .solhint.json with recommended rules + custom config
  - 160 char line length (warn)
  - Double quotes enforcement (error)
  - Explicit visibility required (error)
  - Console statements allowed (scripts/tests need them)
  - Gas optimization warnings enabled
  - Ignores test/helpers/, lib/, out/, cache/, broadcast/

- Added foundry.toml [fmt] section
  - 160 char line length
  - 4-space tabs
  - Double quotes
  - Thousands separators for numbers
  - Sort imports enabled

- Added .lintstagedrc.json for pre-commit auto-fix
  - Runs solhint --fix on .sol files
  - Runs forge fmt on .sol files

- Added husky pre-commit hook via lint-staged

- lint:sol - run solhint
- lint:sol:fix - auto-fix solhint issues
- format:sol - format with forge fmt
- format:sol:check - check formatting
- lint / lint:fix - combined commands

- Added explicit visibility modifiers (internal) to constants in scripts and tests
- Fixed quote style in DeployLocal.sol
- All Solidity files formatted with forge fmt

-  forge fmt --check passes
-  No solhint errors (warnings only)
-  forge build succeeds
-  forge test passes (107/107)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 13:15:31 +00:00
johba
f8927b426e webapp - ESLint + Prettier with pre-commit hooks (#54)
resolves #47

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/54
2025-10-03 16:51:44 +02:00
johba
2acb619a11 feat(landing): add strict ESLint + Prettier with pre-commit hooks (#50)
- Install ESLint 9 with flat config, TypeScript, Vue plugins
- Configure Prettier (140 char, 2-space indent, single quotes)
- Add pre-commit hooks via husky + lint-staged for auto-fix
- Rename components to multi-word (Countdown → CountdownTimer, etc.)
- Add explicit TypeScript prop/emit interfaces
- Remove all console.log statements
- Fix all ESLint violations and type errors
- Verify type-check, build, and HMR working

resolves #43

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/50
2025-10-03 13:19:20 +02:00
johba
09c36f2c87 lint/lib (#49)
resolves #42

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/49
2025-10-03 11:57:01 +02:00
johba
4f7cebda56 start stack from container (#40)
resolves #36

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/40
2025-10-02 17:11:22 +02:00
johba
3a7162462b startup-optimizations (#48)
resolves #34

Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/48
2025-10-02 17:00:21 +02:00
johba
3ab2d9454a health checks (#39)
resolves #35

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/39
2025-10-02 14:37:59 +02:00
johba
a29ca1a26a Harden kraiken-lib watch loop and confirm host-built dist propagation (#38)
- expand scripts/watch-kraiken-lib.sh to watch atomic rename events, validate required tools, and gracefully restart only the containers that mount kraiken-
  lib/dist
  - verify the host-built dist is mounted read-only inside each service and observe live rebuild + restart behavior under inotify
  - run the local podman stack, exercise the watcher by editing kraiken-lib/src/helpers.ts, and confirm GraphQL responds through Caddy after restarts

resolves #33

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/38
2025-10-02 14:33:59 +02:00
johba
b4c829e4d6 fix/podman-postgres-integration (#37)
resolves #25

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/37
2025-10-01 20:26:49 +02:00
johba
8947ec11ca Merge pull request 'Refactor kraiken-lib helpers into focused modules with updated tests' (#32) from feature/split-kraiken-helpers into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/32
2025-10-01 14:49:30 +02:00
openhands
327e2c1308 addresses issue 27 2025-10-01 14:43:55 +02:00
johba
26a8771848 Extract snatch selection into reusable composable (#30)
## Summary

  - add a useSnatchSelection composable that centralises snatch shortfall calculations, position filtering, and RPC memoisation
  - refactor StakeHolder.vue to consume the composable instead of reimplementing the flow inline
  - introduce Vitest config and first composable tests (useSnatchSelection.spec.ts) to cover empty/partial fills and ownership edge cases
  - wire up project tooling updates so the new tests run (jsdom dep, updated package metadata)

  ## Testing

  - cd web-app && npm install
  - npm test

resolves #24

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/30
2025-09-30 20:35:47 +02:00