Skip to content

Latest commit

 

History

History
164 lines (134 loc) · 8.04 KB

CONTRIBUTING.md

File metadata and controls

164 lines (134 loc) · 8.04 KB

Contributing to Hermex

Thanks for your interest in contributing! This document covers local setup, running tests, code signing for contributors, and the PR workflow. Please also read the Code of Conduct.

Local setup

  • Xcode 27 (CI pins 27.1; the deployment target is iOS 18).
  • Clone the repo and open HermesMobile.xcodeproj. Dependencies resolve automatically via Swift Package Manager — the dependency list is locked in AGENTS.md; do not add new ones without maintainer approval. Their versions are pinned in the committed Package.resolved; Dependabot proposes updates, and CI fails rather than re-resolving when the pin no longer matches the project.
  • Build and run the HermesMobile scheme on an iPhone simulator (iPhone 17 is the reference device; any recent iPhone simulator works).
  • To use the app, you need your own Hermes Agent host. The app is a client only. See the README for setup and reachable-server options (http://localhost:9119 works for simulator-only testing).

Running tests

Run the tests your change affects before opening a PR. PR CI runs the full XCTest suite on every push to a pull request that changes the app, and is the green bar; a PR limited to docs or scripts/ skips it (AGENTS.md § Verifying):

scripts/test-sim <simulator-udid> --only HermesMobileTests/<TestClass>

Choose an available iPhone UDID from xcrun simctl list devices available. The runner builds a signed Debug app and runs tests serially on that device; see Local XCTest for focused tests and logs. CI runs the suite with code signing disabled, so forks get green CI without any secrets.

Code signing for contributors

The project's committed signing identity (DEVELOPMENT_TEAM, bundle IDs) belongs to the maintainer. Never edit project.pbxproj to sign with your own team — override locally instead:

  1. Create Config/Local.xcconfig (it is gitignored, so it never lands in a PR):

    DEVELOPMENT_TEAM = YOUR_TEAM_ID
    // Required whenever you set your own team: use your own bundle ID prefix.
    // The app-group entitlement must stay in sync with the bundle ID.
    APP_BUNDLE_IDENTIFIER = com.yourname.hermex
    APP_GROUP_IDENTIFIER = group.com.yourname.hermex
    

    Always override the bundle and app-group IDs along with the team. With the committed defaults, Xcode registers any extension ID the maintainer hasn't registered yet to your team, and the release can't use that ID afterwards.

  2. Build normally. Config/Shared.xcconfig is wired into the project and ends with #include? "Local.xcconfig", so your local values override the committed defaults for every target — no project-file changes needed.

For simulator-only development you usually don't need any of this: simulator builds don't require a paid team. CI runs with CODE_SIGNING_ALLOWED=NO; installing such a build on a simulator for manual testing breaks Keychain entitlements — use a normally-signed build for that (see AGENTS.md).

What PRs we welcome (and what we don't)

Bug fixes, test coverage, and focused improvements are always welcome. For anything larger than a small fix, open an issue first and wait for a maintainer nod before writing code — it protects your time as much as the review queue (PR workflow says what the nod looks like). Drive-by rewrites, reformat-the-world diffs, and unannounced architecture overhauls will be closed without detailed review.

Keep each PR to one logical change with a reviewable diff. If a change is independently useful, it deserves its own PR.

Hermex has one maintainer and limited review time. Opening a PR does not create an obligation to review or merge it.

What to expect

  • A first answer within 7 days. Every issue, and every PR once it is marked ready for review, gets a public first answer within 7 days. An answer is a review, a question, a label with a short reply, or a closure. It is not a promise to merge.
  • Who writes it. Triage replies may be drafted by the maintainer's coding agent. Each one says so, naming the model and harness, and the maintainer approves it before it is posted.
  • How things get closed. A closure names its reason: the rule in this document that applies, or that the maintainer has decided not to take the work on (wontfix). It gives the evidence and says what would get it reconsidered. Closed work can be reopened.
  • The 30-day rule. A draft PR with no activity from its author for 30 days is closed with a "reopen when ready" note. So is an issue where the maintainer asked a public question and the reporter has not answered for 30 days. The clock starts at the question, not at a label.

App bug or server bug?

Hermex is a thin client over your server, so a fair share of apparent app bugs are really server bugs. Before filing a bug here, reproduce it in the server's own web interface against the same server: the Hermes dashboard, or the web UI on a legacy hermes-webui server.

  • Breaks in the web interface too → it's a server bug. File it upstream (Hermes Agent or hermes-webui); if the app should still handle it more gracefully, open an issue here that links the upstream ticket (we track those with the upstream-change label).
  • Only breaks in the app → file it here with the bug-report form.

Not sure which? Your Hermes agent can triage it for you: it checks the server's logs, reads the app's source at your version, looks for duplicates, and drafts the issue for your approval. Send it:

I'm having a problem with Hermex, the iPhone app I use to reach you. Fetch https://raw.githubusercontent.com/uzairansaruzi/hermex/master/.github/triage/PLAYBOOK.md and follow it to help me triage it.

PR workflow

  1. Start from an issue. Every change should trace to a GitHub issue; open one first if none exists (bug/feature templates are provided).
    • Small fixes (a small bug fix, added test coverage, a docs correction) need the linked issue and nothing more.
    • Anything larger, bug fix or not, needs a go-ahead: comment on the issue asking to take it, and wait until the maintainer assigns it to you on GitHub. The assignment is the go-ahead.
    • An issue that is not assigned to a contributor is not reserved. The maintainer's coding agents may build it at any time, including overnight.
  2. Branch from master as issue/<number>-<short-slug> (e.g. issue/42-fix-session-search).
  3. Make the change, keeping these repo hard rules (full list in AGENTS.md):
    • Tolerant decoding: every Codable model uses optionals for fields the server might add or rename — never crash on unknown fields.
    • Never invent API endpoints or JSON shapes — verify against the pinned upstream source (hermes-agent, or hermes-webui for legacy servers) or your own running server.
    • No new third-party dependencies without approval.
  4. Run the affected tests (command above) and make sure they pass.
  5. Open a PR against master using the PR template — link the issue with Fixes #<number>, describe what changed and how you tested it. CI must be green; automated review bots may comment, and the maintainer reviews and merges.
  6. Disclose AI usage in one line of the PR description: the tool/model used (e.g. "built with Claude Code"), or "human-authored". This repo is itself built with coding agents, so it's normal context for review — not a gate.

master is the protected release-candidate branch. Releases and TestFlight uploads (.github/workflows/*-testflight.yml) are maintainer-only operations — contributors never need App Store Connect access.

Questions

Ask in GitHub Discussions if something here is unclear or wrong — docs fixes are welcome contributions too.