Skip to content

docs: add comprehensive documentation for fuzzy_match utility - #1

Open
AlHeloween wants to merge 1 commit into
mainfrom
document-fuzzy-match-12523197037190092627
Open

docs: add comprehensive documentation for fuzzy_match utility#1
AlHeloween wants to merge 1 commit into
mainfrom
document-fuzzy-match-12523197037190092627

Conversation

@AlHeloween

Copy link
Copy Markdown
Owner

Added industry-standard documentation for the `fuzzy_match` and
`fuzzy_indices` functions in `codex-rs/utils/fuzzy-match/src/lib.rs`.
The documentation follows Google Style and includes:

  • High-level module summary and architectural context.
  • Explicit parameter and return value definitions.
  • Detailed internal logic and complexity analysis (Time: O(N+M), Space: O(N+M)).
  • Handled exceptions and edge cases.
  • "Quick Start" usage examples.
  • Dependency listing.

Verified with `cargo test -p codex-utils-fuzzy-match`, including doctests.


PR created automatically by Jules for task 12523197037190092627 started by @AlHeloween

Added industry-standard documentation for the \`fuzzy_match\` and
\`fuzzy_indices\` functions in \`codex-rs/utils/fuzzy-match/src/lib.rs\`.
The documentation follows Google Style and includes:
- High-level module summary and architectural context.
- Explicit parameter and return value definitions.
- Detailed internal logic and complexity analysis (Time: O(N+M), Space: O(N+M)).
- Handled exceptions and edge cases.
- "Quick Start" usage examples.
- Dependency listing.

Verified with \`cargo test -p codex-utils-fuzzy-match\`, including doctests.

Co-authored-by: AlHeloween <5569912+AlHeloween@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

AlHeloween pushed a commit that referenced this pull request Jul 10, 2026
## Stack

1. [1 of 3] Support long raw TUI goal objectives - openai#27508
2. [2 of 3] Support long pasted text in TUI goals - openai#27509
3. **[3 of 3] Support images in TUI goals** - this PR

## Why

The first two PRs make goal definitions resilient to long text, but
`/goal` still dropped image inputs from the composer. That meant a user
could attach images while defining a goal and the resulting goal
continuation would not have any useful reference to those images.

Goal state still persists only objective text, so image inputs need to
become paths or URLs that the agent can read later.

## What Changed

- Extends TUI `GoalDraft` with local image attachments and remote image
URLs.
- Copies local goal images through the app-server filesystem layer into
the managed goal attachment directory, then rewrites active image
placeholders to file references.
- Appends unplaced local images and remote image URLs to the objective
as referenced image files or URLs.
- Preserves goal image metadata through live `/goal` submission and
queued `/goal` dispatch.

## Verification

- Added goal materialization coverage for local image files and remote
image URLs.
- Added/updated TUI slash-command coverage showing `/goal` drafts
include attached images instead of dropping them.

## Manual Testing

- Attached an image by bracketed-pasting its local path into a live
`/goal` composer. The `[Image #1]` placeholder became a server-host
`image-1.png` reference, copied bytes matched exactly, and no attachment
was written under the TUI's local home.
- Deleted an image placeholder before submitting a small goal and
verified no image was copied.
- Attached PNG and JPEG files to the same goal. Placeholder order was
preserved as `image-1.png` and `image-2.jpg`, and both remote copies
matched their source bytes.
- Tried extensionless, malformed-extension, and
extension/content-mismatched paths; the composer rejected them as image
attachments before goal dispatch rather than creating misleading managed
image files.
- Combined a local image, a large pasted block, and enough raw text to
exceed 4,000 characters. The remote attachment directory contained the
image, paste sidecar, and `goal-objective.md`; all embedded references
used server-host paths and both payloads matched their sources.
- Submitted an image replacement while a goal was active, verified no
image was copied before confirmation, then canceled and confirmed the
attachment count was unchanged.
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.

1 participant