Skip to content

ios-fleet: test a glued # and a # inside quotes against the prelude comment start (AFC-517) - #324

Merged
jaywedgeworth22 merged 4 commits into
mainfrom
gb-compiler/asc-prelude-comment-tests
Oct 25, 2026
Merged

jaywedgeworth22 merged 4 commits into
mainfrom
gb-compiler/asc-prelude-comment-tests

Conversation

@jaywedgeworth22

@jaywedgeworth22 jaywedgeworth22 commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

ios-fleet: test glued and quoted # against prelude comment detection

Summary

  • Extend the synthetic prelude extraction tests in scripts/ios-fleet/test-asc-credentials.sh with two cases:
    • A # immediately following a closing quote.
    • A # inside a quoted string.
  • Verify that neither hash is treated as the start of a shell comment.
  • Confirm that the subsequent } remains structural and closes the prelude body, causing a following indented command to be rejected with the expected positional-argument error rather than included in or executed as part of the prelude.
  • This PR adds regression coverage only; production behavior is unchanged.

Summary

  • Added a positive-control regression test for iOS fleet ship-prelude extraction.
  • Verifies that a } inside a quoted string is treated as string content rather than a structural shell brace.
  • Confirms that valid preludes containing quoted braces are accepted without prematurely ending the extracted body or being rejected as positional commands.

Testing

Updated scripts/ios-fleet/test-asc-credentials.sh with a synthetic quoted-brace prelude case that fails if extract_ship_prelude refuses the prelude.


Updated the 12a-quint section comment in scripts/ios-fleet/test-asc-credentials.sh to match the surrounding formatting. The comment documents the positive-control case for a valid prelude containing a brace inside a quoted string. This is a comment-only change; prelude parsing, credential extraction, and test behavior are unchanged.


Normalizes the 12a-quint test comment in scripts/ios-fleet/test-asc-credentials.sh by removing extra spacing after the section label. This is a comment-only cleanup and does not change prelude parsing or test behavior.

Follow-up to #319 for Kody thread r4371224986.  This commit was pushed to the #319 branch just after that PR merged, so it never reached main.  It is test-only and changes just scripts/ios-fleet/test-asc-credentials.sh.

  • gluedarg ( true "x"# }) is the review's own shape.  A # glued to a closing quote isn't a comment start, so the } still counts, and the indented command after it must be refused as positional.
  • quotedhash ( true " #";}): a # inside quotes isn't a comment start either, so the } closes the body and the indented command after it must be refused.

Proof.  Each case was checked by breaking the rule on purpose and restoring it afterwards.  Counting comments on the stripped line instead of the position-preserving mask fails the suite on gluedarg when it runs alone, and finding the comment start on the raw line fails it on quotedhash.  test-asc-credentials.sh and the full iOS ship contract set pass locally (163/163 node tests plus the shell suites), with synthetic content only and no credentials.

Follow-up in 62723e5.  Section 12a-quint adds a positive control for Kody's quoted-brace finding: a valid prelude whose body holds echo "a } b" has to be accepted.  Counting braces on the raw line instead of the quote-masked line fails the suite, which proves the check works.

…de quotes against the raw-line comment start (Kody, AFC-517)
@linear-code

linear-code Bot commented Oct 25, 2026

Copy link
Copy Markdown

AFC-517

@kody-ai

This comment has been minimized.

@kody-ai

kody-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

kody code-review Kody Rules low

PR description uses double ASCII spaces instead of NBSP sentence gaps

The double ASCII spaces collapse in rendered Markdown, making sentence gaps inconsistent. Replace each affected . boundary with U+00A0 followed by one ASCII space.

Kody rule violation: Sentence gap by surface: two ASCII spaces in files, U+00A0 plus a space in rendered copy and GitHub text

Prompt for LLM
PR description uses double ASCII spaces instead of NBSP sentence gaps

The PR description uses two ASCII spaces after sentence-ending periods. WHY: GitHub prose requires an actual U+00A0 followed by one ASCII space at every sentence gap, so replace each affected `. ` boundary with ` `.

Kody rule violation: [Sentence gap by surface: two ASCII spaces in files, U\+00A0 plus a space in rendered copy and GitHub text](https://app.kodus.io/settings/code-review/global/kody-rules/2a52ef80-886f-4e53-994b-2f70ee73f305?teamId=69360e3a-6b41-45d2-9e49-fde78fe49457)

​

@kody-ai

kody-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

kody code-review Business Logic medium

Task description is insufficient for business logic validation.

🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

🔍 What I need to validate:

  • Business requirements and acceptance criteria
  • Expected behavior and business rules
  • Edge cases and constraints to consider

💡 How to improve the task context:

  • Add a description to the linked ticket
  • Include acceptance criteria or business rules
  • Describe the expected behavior after the change

⚠️ Important:

A task title alone is not sufficient to determine whether the implementation is correct or complete.


💡 This validation runs automatically only on the first review of a pull request. To run it again, comment @kody -v business-logic.

Prompt for LLM
Task description is insufficient for business logic validation.

<!-- task_context_status:weak -->
## 🤔 Insufficient Task Context

I found a task linked to this PR, but it only contains minimal information (title only, no description or acceptance criteria). To perform a meaningful business rules validation, I need more details.

### 🔍 What I need to validate:
- Business requirements and acceptance criteria
- Expected behavior and business rules
- Edge cases and constraints to consider

### 💡 How to improve the task context:
- Add a description to the linked ticket
- Include acceptance criteria or business rules
- Describe the expected behavior after the change

### ⚠️ Important:
A task title alone is not sufficient to determine whether the implementation is correct or complete.

---
> 💡 This validation runs automatically only on the first review of a pull request. To run it again, comment `@kody -v business-logic`.

​

Comment thread scripts/ios-fleet/test-asc-credentials.sh
@jaywedgeworth22

Copy link
Copy Markdown
Member Author

Restored the PR description: Kody's generated summary had replaced it, which dropped the references to #319 and Kody thread r4371224986.  Every sentence gap in it now uses U+00A0 plus a space, and the 62723e5 follow-up is noted.  On the business-logic note: this PR is test-only regression coverage for that thread, so the linked AFC-517 ticket's scope is set by #319 and the thread itself.

@jaywedgeworth22

Copy link
Copy Markdown
Member Author

@kody start-review

@kody-ai

This comment has been minimized.

@kody-ai

kody-ai Bot commented Oct 25, 2026

Copy link
Copy Markdown

kody code-review Kody Rules low

New source comment has a one-space sentence boundary

Revises an earlier Kody suggestion on scripts/ios-fleet/test-asc-credentials.sh:981 (2026-10-25 17:00 UTC).

This plain-text source comment fails the required two-space sentence boundary. Add a second ASCII space after 12a-quint..

Kody rule violation: Sentence gap by surface: two ASCII spaces in files, U+00A0 plus a space in rendered copy and GitHub text

Prompt for LLM
New source comment has a one-space sentence boundary

**Revises an earlier Kody suggestion** on `scripts/ios-fleet/test-asc-credentials.sh:981` (2026-10-25 17:00 UTC).

The positive control addresses the earlier missing-control concern, but its new source comment uses one ASCII space after `12a-quint.`. This is a plain-text source comment, so rule [7] requires two ASCII spaces at the sentence boundary and does not permit an NBSP or entity remedy.

Kody rule violation: [Sentence gap by surface: two ASCII spaces in files, U\+00A0 plus a space in rendered copy and GitHub text](https://app.kodus.io/settings/code-review/global/kody-rules/2a52ef80-886f-4e53-994b-2f70ee73f305?teamId=69360e3a-6b41-45d2-9e49-fde78fe49457)

​

The positive-control comment added for the quoted-brace case ends its
section label with a single space, which the two-space file sentence
rule flags.  Fix the one space so the new lines in this branch are
rule-clean.

Refs AFC-517.  Copy-rule fix by BF-DEPLOYER so the branch can land.
@kody-ai

This comment has been minimized.

…le bit

Jay ruled that code comments are exempt from the sentence-spacing rule, so the
12a-quint label keeps the single space its neighbouring section headers use.
b2ce410 also dropped the executable bit (100755 to 100644); this restores it.
@jaywedgeworth22

Copy link
Copy Markdown
Member Author

@kody Per Jay, the sentence-spacing rule doesn't apply inside code, including source comments, so this one is exempt.  The 12a-quint. label also matches its neighbouring section headers (12a-ter., 12a-quater.), so no change is needed.  Commit b2ce410 had added the second space anyway and also dropped the script's executable bit, so d3da8a3 reverts it and the file is back to 62723e5's content and 100755 mode.

@kody-ai

kody-ai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Kody Review Complete

Great news! 🎉
No issues were found that match your current review configurations.

Keep up the excellent work! 🚀

⚠️ 2 Kody Rule(s) were not evaluated

These rules declare that they need repository context beyond this diff, and the review could not retrieve it, so they were not judged on this pull request:

  • Never move or delete existing app support.html URLs
  • Never log tokens or credentials; only safeIssues may reach the handoff file
Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Validate Business Logic: Ask Kody to validate your code against business rules by adding a comment with the @kody -v business-logic command.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a 👍 for helpful suggestions or a 👎 if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Bug ✅
Performance ✅
Security ✅
Business Logic ✅

Access your configuration settings here.

​

@jaywedgeworth22
jaywedgeworth22 merged commit 3938a6b into main Oct 25, 2026
5 checks passed
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