Commit graph

618 commits

Author SHA1 Message Date
openhands
1abe51b348 fix: Add cache headers to Ponder GraphQL proxy in Caddy (#447) 2026-03-06 02:30:56 +00:00
johba
b711860152 Merge pull request 'fix: sellAllKrk uses amountOutMinimum: 0n with no throw on 0 output (#450)' (#474) from fix/issue-450 into master 2026-03-06 03:25:33 +01:00
openhands
d0e651ffc9 fix: sellAllKrk uses amountOutMinimum: 0n with no throw on 0 output (#450)
Replace console.warn with a thrown Error when wethReceived <= 0n so any
caller without a return-value check is protected, not just always-leave.spec.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 01:51:23 +00:00
johba
61f9e07e60 Merge pull request 'fix: E2E test files use file-level eslint-disable for no-restricted-syntax, suppressing all future rules in that group (#451)' (#473) from fix/issue-451 into master 2026-03-06 02:44:16 +01:00
openhands
6b7ac781fb fix: E2E test files use file-level eslint-disable for no-restricted-syntax, suppressing all future rules in that group (#451)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-06 01:12:26 +00:00
johba
1ceb6647f7 Merge pull request 'fix: KRK fees to feeDestination undocumented (#458)' (#471) from fix/issue-458 into master 2026-03-06 02:01:28 +01:00
openhands
e09a995733 fix: KRK fees to feeDestination undocumented (#458) 2026-03-06 00:32:18 +00:00
openhands
496a464baf fix: KRK fees to feeDestination undocumented (#458) 2026-03-06 00:01:28 +00:00
johba
7dc0c52664 Merge pull request 'fix: e2e test uses getByRole('combobox', { name: 'Tax' }) against a label 'Position Cost (Tax Rate)' (#467)' (#469) from fix/issue-467 into master 2026-03-06 00:10:42 +01:00
openhands
660204ac14 fix: e2e test uses getByRole('combobox', { name: 'Tax' }) against a label 'Position Cost (Tax Rate)' (#467) 2026-03-05 22:41:00 +00:00
johba
89134800c2 Merge pull request 'fix: evaluator: add stakeKrk and unstakeKrk browser helpers (#460)' (#466) from fix/issue-460 into master 2026-03-05 16:34:25 +01:00
openhands
4e6182acc6 fix: evaluator: add stakeKrk and unstakeKrk browser helpers (#460)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 15:09:54 +00:00
openhands
ad9a113a9c fix: evaluator: add stakeKrk and unstakeKrk browser helpers (#460) 2026-03-05 14:38:13 +00:00
openhands
b7bbbb9b89 fix: evaluator: add stakeKrk and unstakeKrk browser helpers (#460)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 14:37:56 +00:00
johba
0b5752ca52 Merge pull request 'fix: evaluator: add sellKrk browser helper (uses sell widget from #456) (#461)' (#465) from fix/issue-461 into master 2026-03-05 15:25:47 +01:00
openhands
c891b3c617 fix: address review findings in sellKrk helper
- Fix max-button race: wait for input to be non-empty after clicking Max
  (setMax is async, composable calls loadKrkBalance() before setting value)
- Add on-chain confirmation via WETH Transfer event polling (mirrors buyKrk)
  so balance query happens after the swap is mined, not just UI-idle
- Use Pick<SellConfig, 'rpcUrl' | 'accountAddress'> since krkAddress is unused
- Add page heading assertion after navigate (consistent with buyKrk)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:58:14 +00:00
openhands
912c7e4eee ci: retrigger after infra failure 2026-03-05 13:24:44 +00:00
openhands
61a9fd7e58 fix: evaluator: add sellKrk browser helper (uses sell widget from #456) (#461)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 13:13:04 +00:00
johba
3a3a7844ed Merge pull request 'fix: feat: Add sell KRK widget to get-krk page (#456)' (#464) from fix/issue-456 into master 2026-03-05 14:01:44 +01:00
openhands
5b69d9ee3d fix: address review findings in sell KRK widget
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 12:39:15 +00:00
openhands
36c798605f fix: feat: Add sell KRK widget to get-krk page (#456)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 12:03:36 +00:00
johba
466e0d7767 Merge pull request 'fix: evaluator: add market simulation and recenter helpers (#455)' (#457) from fix/issue-455 into master 2026-03-05 12:51:29 +01:00
openhands
9cda5beb4a fix: address review findings in market and recenter helpers
- recenter.ts: parse isUp from Recentered event logs instead of a
  follow-up eth_call that would decode wrong post-recenter state
- recenter.ts: remove hardcoded private key from comment; add blocks>0
  guard in mineBlocks; call provider.destroy() to prevent leaked intervals
- market.ts: snapshot KRK balance before buy to compute krkBought as
  delta instead of cumulative total; call provider.destroy() on exit;
  remove unused withdraw entry from WETH_ABI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 11:27:31 +00:00
johba
32b9d86f18 Merge pull request 'docs: clarify fees go to protocol treasury, not holders' (#453) from docs/fee-destination-clarity into master
Reviewed-on: https://codeberg.org/johba/harb/pulls/453
2026-03-05 12:03:01 +01:00
openhands
5c7b488753 docs: clarify fees go to protocol treasury, not holders
- Add Fee Destination section to PRODUCT-TRUTH.md
- Explicitly ban 'fees grow your KRK value' and 'auto-compounding' claims
- Clarify holder value comes from asymmetric slippage, not fee reinvestment
- Fix misleading 'floor always goes up if fee income exceeds sell pressure'
- Update ARCHITECTURE.md feeDestination annotation
2026-03-05 12:02:45 +01:00
openhands
1973ccf25b fix: evaluator: add market simulation and recenter helpers (#455)
- Export waitForReceipt from swap.ts so market.ts and recenter.ts can reuse it
- Add market.ts with roundTripSwap: direct-RPC buy+sell round-trip using ethers Wallet
- Add recenter.ts with triggerRecenter (calls LiquidityManager.recenter()) and mineBlocks (anvil_mine)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 10:52:28 +00:00
johba
4066ea6db4 Merge pull request 'feat(holdout): add passive-confidence/no-dilution scenario' (#437) from feat/holdout-no-dilution into master 2026-03-05 11:31:56 +01:00
openhands
9b321b6774 ci: retrigger 2026-03-05 08:41:22 +00:00
openhands
cd459bb9b0 fix: correct buyKrk call sites for new opts param, add eslint-disable for polling loop
- no-dilution.spec.ts: pass undefined for opts, screenshotPrefix as 4th arg
- swap.ts: add eslint-disable-next-line for eth_getFilterLogs polling delay
2026-03-05 05:53:19 +00:00
openhands
e6bd236bcc ci: retrigger 2026-03-05 05:51:08 +00:00
openhands
dca57738b7 ci: retrigger after Codeberg OAuth refresh 2026-03-05 05:51:08 +00:00
openhands
f214ac8587 fix: address PR #437 review findings
- Fix price impact formula: (10000n - ...) instead of (1n - ...)
- Extract ETH_AMOUNT constant in always-leave to avoid duplication
- Add screenshotPrefix param to buyKrk for unique screenshot paths
2026-03-05 05:51:08 +00:00
openhands
c25c757024 feat(holdout): add passive-confidence/no-dilution scenario
Verifies that passive holders are not diluted when new buyers enter.

- Two wallets (Anvil accounts 4 & 5) buy KRK sequentially
- First buyer's balance must remain unchanged after second buy
- Second buyer receives fewer tokens per ETH due to AMM price impact
- Tests core protocol invariant: holding KRK does not dilute position
2026-03-05 05:51:03 +00:00
johba
0f4d07a4b7 Merge pull request 'docs: add engineering principles to AGENTS.md' (#441) from docs/engineering-principles into master 2026-03-05 06:47:52 +01:00
johba
921dfdca55 Merge pull request 'Move holdout scenarios to separate repo' (#438) from feat/move-holdout-scenarios-to-separate-repo into master 2026-03-05 06:47:41 +01:00
openhands
ca2be4c4e9 ci: retrigger 2026-03-04 08:20:17 +00:00
openhands
92ede4c7b7 address review: clarify eth_newFilter is polling not subscription, acknowledge existing violations 2026-03-04 08:20:17 +00:00
openhands
b2bb28f1b9 ci: retrigger after git clone auth failure 2026-03-04 08:20:17 +00:00
openhands
7fc47d739a ci: retrigger 2026-03-04 08:20:11 +00:00
openhands
106521af2e ci: retrigger after Codeberg OAuth refresh 2026-03-04 08:20:11 +00:00
openhands
f6fe37dcc0 fix: address PR #438 review findings
- Fix HOLDOUT_SCENARIOS_DIR to use absolute path (resolves Playwright testDir issue)
- Remove dead SCENARIOS_DIR variable
- Replace fallback with explicit error in holdout.config.ts
- Add SSH key requirement comment
2026-03-04 08:20:11 +00:00
openhands
69f6a87e20 Move holdout scenarios to separate repo
- Updated holdout.config.ts to use HOLDOUT_SCENARIOS_DIR env var
- Modified evaluate.sh to clone harb-holdout-scenarios repo at runtime
- Deleted scripts/harb-evaluator/scenarios/ directory
- Added .holdout-scenarios/ to .gitignore
- Holdout scenarios are now cloned into .holdout-scenarios/ during evaluation
- This prevents dev-agent from seeing the holdout test set
2026-03-04 08:20:11 +00:00
johba
b2594a28b3 Merge pull request 'fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442)' (#443) from fix/issue-442 into master 2026-03-03 23:37:46 +01:00
openhands
2483630a2d fix: add eslint-disable for Promise+setTimeout in CollapseActive.vue (#442)
No push event exists for Ponder indexing completion; grandfathered with
justification comment per the no-fixed-delays rule exception policy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 22:10:06 +00:00
openhands
0a15df2e01 ci: retrigger after infra failure 2026-03-03 22:00:44 +00:00
johba
05191bb15f Merge pull request 'feat(holdout): Add reasonable slippage assertion to always-leave scenario' (#436) from fix/holdout-slippage-check into master 2026-03-03 22:41:23 +01:00
johba
16abdcbefb fix: add RPC propagation delay after browser-initiated swap (#434)
After `buyKrk()` completes (swap widget returns to idle), the Anvil RPC may briefly return stale balance state. Adds 2s delay to ensure `getKrkBalance` reads post-swap state.

Without this fix, the holdout scenario reports identical KRK balance before and after swap despite the transaction succeeding (success toast visible).

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/434
2026-03-03 22:20:02 +01:00
openhands
748557bc83 fix: lint: Ban waitForTimeout, setTimeout-as-delay, and fixed sleep patterns (#442)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 20:58:01 +00:00
openhands
62eadd0c11 ci: retrigger after git clone auth failure 2026-03-03 20:58:01 +00:00
openhands
74a043262d feat(holdout): Add reasonable slippage assertion to always-leave scenario
- Modified sellAllKrk helper to return WETH delta received
- Added assertion: WETH received >= 90% of ETH spent (0.09 ETH minimum)
- Added log showing actual slippage percentage
- This proves 'always leave' with reasonable slippage, not just exit ability
2026-03-03 19:45:46 +00:00