Skip to content

refactor: replace encodeLossless with encode(value, precise) overload#92

Merged
0xferit merged 2 commits intomainfrom
claude/issue-90-20260313-1816
Mar 13, 2026
Merged

refactor: replace encodeLossless with encode(value, precise) overload#92
0xferit merged 2 commits intomainfrom
claude/issue-90-20260313-1816

Conversation

@0xferit
Copy link
Owner

@0xferit 0xferit commented Mar 13, 2026

Merges encodeLossless into a single overloaded encode(q, value, bool precise).

When precise=true it reverts on non-aligned values (same behaviour as the old encodeLossless); the two-argument overload is unchanged (lossy floor encoding).

Closes #90

Generated with Claude Code

Merges `encodeLossless` into a single overloaded `encode(q, value, bool precise)`.
When `precise=true` it reverts on non-aligned values (same behaviour as the old
`encodeLossless`); the zero-argument overload is unchanged (lossy floor encoding).

Co-authored-by: Ferit <0xferit@users.noreply.github.com>
@0xferit
Copy link
Owner Author

0xferit commented Mar 13, 2026

@claude ci is failing

@claude
Copy link

claude bot commented Mar 13, 2026

Claude finished @0xferit's task in 1m 1s —— View job


CI Fix Applied

  • Gather context
  • Check CI status and logs
  • Identify the failure
  • Fix the issue
  • Push fix

Root cause: src/showcase/ShowcaseSolidityFixtures.sol still called encodeLossless in two places, which was removed by this PR:

  • Line 83 (stakeExact in QuantizedETHStakingShowcase)
  • Line 168 (setExtremeStrict in QuantizedExtremePackingShowcase)

Fix: Updated both calls to use the new encode(value, true) overload.
| Branch

…ad of encodeLossless

Co-authored-by: Ferit <0xferit@users.noreply.github.com>
@0xferit
Copy link
Owner Author

0xferit commented Mar 13, 2026

Error: Action failed with error: Workflow initiated by non-human actor: claude (type: Bot). Add bot to allowed_bots list or use '*' to allow all bots.
Error: Process completed with exit code 1.
@claude

@claude
Copy link

claude bot commented Mar 13, 2026

Claude finished @0xferit's task in 1m 0s —— View job


CI Failure Analysis

  • Gather context
  • Check CI status and identify failing workflow
  • Analyze the error
  • Provide fix or explanation

The failing workflow is Claude Code Review (.github/workflows/claude-code-review.yml).

Root cause: When I pushed commits to this PR branch, it triggered the pull_request: synchronize event, which re-ran the Claude Code Review workflow — but with claude (a Bot) as the actor. The anthropics/claude-code-action@v1 action blocks bot-initiated runs by default unless allowed_bots is configured.

Actor type: Bot
Error: Workflow initiated by non-human actor: claude (type: Bot).
Add bot to allowed_bots list or use '*' to allow all bots.

Fix required in .github/workflows/claude-code-review.yml:

Add allowed_bots: '*' (or allowed_bots: 'claude') to the action's with: block:

      - name: Run Claude Code Review
        id: claude-review
        uses: anthropics/claude-code-action@v1
        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
          plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
          plugins: 'code-review@claude-code-plugins'
          prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
          allowed_bots: '*'   # <-- add this line

Alternatively, you can skip the review entirely when the actor is a bot by adding a condition to the job:

  claude-review:
    if: github.actor_type == 'User'   # <-- add this line

Why I can't fix this myself: GitHub App permissions do not allow me to modify files inside .github/workflows/. You'll need to make this change manually. See FAQ for more details.
| Branch

@0xferit
Copy link
Owner Author

0xferit commented Mar 13, 2026

@claude rebase onto main

@claude
Copy link

claude bot commented Mar 13, 2026

Claude finished @0xferit's task in 17s —— View job


Rebase Request

  • Understand the request
  • Assess feasibility

I'm unable to perform a rebase due to a limitation of the Claude Code Action — I cannot execute branch operations like rebase, merge, or other git history-rewriting commands beyond creating and pushing commits.

How to rebase manually:

git checkout claude/issue-90-20260313-1816
git fetch origin main
git rebase origin/main
git push --force-with-lease origin claude/issue-90-20260313-1816

You can find more information and potential workarounds in the FAQ.

| | Branch

@0xferit 0xferit merged commit bdaebb5 into main Mar 13, 2026
1 of 3 checks passed
0xferit added a commit that referenced this pull request Mar 13, 2026
Update terminology from precision to resolution and encodeLossless to
encode(value, true) across README.md, CLAUDE.md, copilot-instructions.md,
and index.html to match the current API after PR #92.
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.

Check API ensure things are named the best way

1 participant