Skip to content
TheChatArchiveThe Chat Archive
GLMz-ai/glm-5.2· unknownHugging Face ibragim-bad/swe_rebench_07_2026_trajectories

ISSUE DESCRIPTION Respect additionalProperties false during v4 OpenAPI schema import…

  1. User

    ISSUE DESCRIPTION

    Respect additionalProperties false during v4 OpenAPI schema import This tracks unresolved feedback identified by cubic on PR #1149: https://github.com/withcoral/coral/pull/1149#discussion_r3347190658

    Context: This appears to be pre-existing DSL v4 behavior surfaced by the refactor review, not a regression from the module split.

    Problem: The schema importer treats the presence of additionalProperties as map-like, so additionalProperties: false can be imported as a free-form map instead of a closed object.

    Acceptance criteria: Handle boolean additionalProperties: false as a closed object, preserve schema-valued additionalProperties behavior, and add focused schema import coverage.

    Interface

    No new interfaces are introduced.

    ADDITIONAL ADVICE

    Since you are given a git repository, you can use git commands to simplify your work. For example, if you made a mistake and want to revert your changes, you can use git checkout <file> to restore the file to its original state. You can also reset all changes in the repository using git reset --hard command. Additionally, you can use git stash and git stash pop to temporarily save your changes and restore them later. Finally, you can see the changes that you've made (which will be submitted when you call submit) using git status or git diff commands. However you don't need to use git add or git commit before submitting your changes. In fact, submit only submits currently unstaged changes because it uses git diff to get the changes that need to be submitted.

    CHECKLIST

    Before submitting your solution, please go over the following checklist and make sure you've done everything:

    • If an error was reported in the issue description, I have successfully reproduced it.
    • If an error was reported in the issue description, I have confirmed that my fix resolves the error.
    • I have thought about edge cases and made sure my fix handles them as well.
    • I have run existing tests in the repository that might have been affected by the change I made and confirmed that they pass. I want you to list every bullet from this checklist and write your reasoning for why you think you did it or didn't need to.

    Repository has been uploaded and your shell is currently at the repository root. Time to solve the issue!

    (Current directory: /coral, current file: none) bash-$

  2. GLM Assistant

    I'll start by exploring the repository structure to understand the codebase.

  3. GLM Assistant

    Now let me look at the IrTypeShape enum to understand the available shapes.

  4. GLM Assistant

    Let me look at the existing tests to understand the test format.

  5. GLM Assistant

    No existing tests for additionalProperties map import. Let me look at the test file structure for a map/import test to understand the pattern, and then I'll add focused coverage. Let me look at one of the tests that checks shape.

  6. GLM Assistant

    Let me look at how the test imports types into the IR. Let me look at the test for the import_openapi_surface and find a ir.types usage.

  7. GLM Assistant

    Now I understand the test pattern. Let me make the fix to the source code first.

  8. GLM Assistant

    Now let me make the fix to handle additionalProperties correctly:

  9. GLM Assistant

    Now let me add focused test coverage. Let me look at the end of the test file to add tests:

  10. GLM Assistant

    Let me check what's imported in the test file:

  11. GLM Assistant

    Now let me add focused tests at the end of the test file:

  12. GLM Assistant

    Now let me build and run the tests to verify:

  13. GLM Assistant

    The issue is the heredoc with r" ... ". The .as_bytes() is on a separate line but there's no trailing newline before the closing ". Actually the issue is the raw string ends with " then newline, then .as_bytes(). Wait, let me check. The existing tests have the same structure. Let me look at the difference.

    Actually the issue is in the raw string: I have additionalProperties: false then newline then " then newline then .as_bytes(). Hmm, that should work... Let me check the actual content. The issue might be that there's an empty line between the raw string and .as_bytes(). Let me look.

  14. GLM Assistant

    That looks fine. Let me check the actual error location more. Line 704. The issue is the import_openapi_surface( call. Let me look at the start of my tests. Maybe there's an issue with the r" raw string ending with " followed by comma? Wait, line 704 is .as_bytes().

    Wait, the error says "expected expression, found .". This means the r"..." string wasn't properly closed, so the " on the previous line didn't end the string. This happens with raw strings when... hmm. Actually no. Let me look at the actual beginning of my added test to ensure the raw string is opened correctly.

  15. GLM Assistant

    This looks fine. The issue might be a missing closing brace or something at the previous end of the file. Let me check the end of the original file before my additions - maybe my cat >> left the file without a trailing newline. Let me look at line 666-668.

  16. GLM Assistant

    That looks fine too. Hmm, the error is at line 704. Let me check the actual file with cat -A to see if there's a hidden character issue. Actually wait, maybe the issue is that additionalProperties: false - the false is a YAML boolean. But that's fine for the test. The compile error is a Rust parse error though, not runtime.

    Let me re-look at the error. "expected expression, found ." at line 704 col 9 which is .as_bytes(). This means the previous token (the closing " of the raw string) wasn't recognized as ending a string literal.

    Wait - raw strings r"...". Inside the raw string I have '#/components/schemas/labels' which contains a "? No. But I have {$ref: '#/components/schemas/labels'} - no double quotes. Hmm.

    Wait, actually the issue might be the empty line. No.

    Actually, wait. Let me reconsider. The raw string starts with r" at line 680. The content includes lines. The raw string ends with " at line 703 (the line ",). Then line 704 is .as_bytes(),.

    But actually, look: the previous test (the original last test) worked fine with the same structure. So why would mine fail?

    Let me actually look very carefully with cat -A around the problematic region to detect any non-ASCII or odd characters.

  17. GLM Assistant

    This looks completely fine. So why is there a parse error at line 704? Let me recount. The error says line 704 is .as_bytes(). But in my view, line 704 is .as_bytes(),. Let me check the actual line numbers - the file should now be 666 (original) + my additions. Wait, the original file was 666 lines. My additions start at 668 (the empty line + #[test]).

    Hmm, but the error reported line 704, 755, 807. Let me actually run cargo build again to see the exact error with the current state, maybe it's stale.

    Actually wait — maybe the problem is the FIRST test (the closed_object one) compiled fine but the error is in a later test? No, all three have the same error.

    Actually, let me reconsider. The raw string r"..." cannot contain a ". But my content has '#/components/schemas/labels' - single quotes, fine.

    Hmm, wait. Maybe the problem is that there are two consecutive raw strings and the first one's closing " ... no.

    Let me just run the build again to see fresh errors.

  18. GLM Assistant

    Wait, line 704 in the error refers to .as_bytes(). But in my sed view, line 704 was .as_bytes(),. So the line numbers match. But the content looks fine!

    Hmm. Wait, the raw string r"..." - the r" starts at line 680. The content is fine. The closing " is at line 703 ",. Then line 704 .as_bytes(),.

    But the parser thinks the " at line 703 doesn't close the raw string. Why?

    OH. I bet the issue is the FIRST raw string (the manifest one) at line 670. That raw string ends at line 678 with ",. Then line 679 is ). That's fine.

    Wait, let me look at the FIRST raw string. The manifest raw string r"name: closed_object...base_url: https://api.example.com\n", and then .expect("manifest").

    Hmm, that's the same pattern as existing tests.

    Wait, maybe the issue is that my heredoc with r" raw strings has an issue. Let me look more carefully. The error is at the SECOND raw string's .as_bytes() (line 704). The first raw string (manifest) at line ~670 ends fine and .expect("manifest") works.

    So the SECOND raw string r"openapi: 3.0.3 ...additionalProperties: false\n", then .as_bytes().

    Wait. Could it be that there's a \r (carriage return) somewhere making the line count off? cat -A showed clean $ endings, no ^M.

    Hmm, let me actually count the lines exactly. Let me use awk to print line numbers.

  19. GLM Assistant

    Wait, the line numbers shifted! In the awk output, line 703 is ", and 704 is .as_bytes(),. But earlier sed showed line 704 was .as_bytes(), too. So the error at line 704 col 9 corresponds to .as_bytes(),.

    The content is identical in structure to existing tests. So why does it fail?

    Wait... maybe import_openapi_surface takes the raw bytes as the THIRD argument but the function signature is import_openapi_surface(v4, surface, bytes) and that's correct.

    Hmm, but the error is a parse error, not type error. "expected expression, found .".

    Let me think about what could make r"..." not parse. If there were an unterminated raw string somewhere BEFORE, then everything after would be consumed. But the manifest raw string at 671 parses fine (line 681 .expect works).

    Wait, actually... is the FIRST test's manifest raw string (671-679) properly closed? Yes, ", at 679.

    So the second raw string at 687 r" opens. Then content... and closes at 703 ",. Then 704 .as_bytes(),.

    This should parse. Unless... there's an issue with the content. A raw string r"..." cannot contain ". Let me check: line 697 schema: {$ref: '#/components/schemas/labels'} - no double quote.

    Hmm wait, what about the YAML '200'? Single quotes, fine.

    I'm confused. Let me check if maybe there's a BOM or invisible char. Let me look at hexdump of line 703-704.

    Actually, wait. Let me reconsider the original error. The error line 704 - but maybe the line numbers in the COMPILED file differ from my awk because... no, awk shows current file.

    Actually, the build error and awk both say line 704 = .as_bytes(),. And it looks fine.

    Hmm, let me compare with an existing working test more carefully. Let me look at the exact bytes of an existing working .as_bytes(), line vs mine.

  20. GLM Assistant

    Let me compare with a working raw string + .as_bytes pattern. Let me find an existing one and diff exactly.

  21. GLM Assistant

    That looks identical to mine. So why does mine fail?

    Let me actually try to compile just to see if the FIRST new test fails or only subsequent ones. The errors are at 704, 755, 807 — all three .as_bytes() lines. So all three new tests fail at the .as_bytes() after the second raw string.

    But the FIRST raw string (manifest) in each test compiles fine. So the issue is specifically the raw string passed to import_openapi_surface.

    Wait — maybe import_openapi_surface's third argument isn't .as_bytes() in existing tests? Let me check how existing tests call import_openapi_surface.

  22. GLM Assistant

    This is identical structure. So why does mine fail?

    Wait, let me reconsider. Maybe the error is actually about something earlier. The compiler error says "expected expression, found ." at 704:9. Column 9. .as_bytes(), - the . is at column 9 (8 spaces + .).

    Hmm, in the working test, .as_bytes(), also has 8 spaces. So col 9 too.

    OK let me think differently. Maybe the issue is that my raw string content has something that breaks it. Let me look very carefully at the raw string content. Wait — could additionalProperties: false cause the YAML to fail at RUNTIME but that wouldn't be a compile error.

    Actually, hold on. Let me re-read the EXACT error. "expected expression, found .". This is a Rust parse error. The only way r"... ... " .as_bytes() fails to parse is if the r"..." is actually NOT closed at the ", line, meaning the parser thinks the string continues.

    A raw string r"..." is closed by the FIRST " it encounters. So if there's a " inside the content before line 703, the string would close earlier and then ", at 703 would be... hmm, that would cause a different error.

    Wait, actually — what if there's NO issue with my test code, but the issue is the ORIGINAL file didn't end with a newline, and my cat >> appended starting right after } without a newline? Let me check line 666-668. Earlier I saw:

    666: }
    667: (blank)
    668: #[test]
    

    That's fine.

    Let me actually try a minimal reproduction. Let me create a tiny standalone test file.

    Actually, wait. Let me reconsider. Maybe the problem is that I have THREE tests and they ALL fail. The FIRST one's manifest raw string compiles (because .expect("manifest") works at 681). But the FIRST one's SECOND raw string fails at 704.

    If the FIRST test's second raw string failed, the manifest raw string of the SECOND test would be inside the failed string... but the error shows 755 (second test's as_bytes) and 807 (third). So each test independently fails at its own .as_bytes(). That means each test's second raw string is somehow not closing properly, but each test's first raw string IS closing properly.

    The difference between the first raw string and second raw string: the first is passed to parse_source_manifest_yaml( and the second to import_openapi_surface(v4, surface, ...).

    OH WAIT. Maybe the issue is import_openapi_surface doesn't exist or has a different signature, so the call import_openapi_surface(v4, surface, r"...", ...) — no, that would be a type error, not parse.

    Hmm, actually a parse error "expected expression, found ." — what if import_openapi_surface is a MACRO and needs !? No, existing tests use it as a function.

    Let me look at the EXACT content of my second raw string with hexdump to check for hidden chars.

  23. GLM Assistant

    No " (0x22) inside the content before the closing, and no \r (0x15 is NAK, 0x0d is CR). So the content is clean.

    Wait, let me reconsider. Maybe the problem is NOT in my test code but the compiler error is misleading. Let me check if there's an unclosed brace in the ORIGINAL file before line 668. Let me count braces. Actually, the original file compiled fine before my additions (it was the existing test file). So the original is fine.

    Hmm, wait. Let me reconsider the cat >> command. When I did cat >> file << 'TESTEOF', the heredoc content included r"..." raw strings. The shell heredoc with quoted delimiter 'TESTEOF' should pass content literally. That should be fine.

    But wait — maybe the heredoc had an issue. Let me look at the actual content that got written. Actually I already viewed it and it looks fine.

    Let me try a totally different approach: let me check if maybe the issue is that the file got a stray character. Let me run rustc's parse via cargo build and look at FULL error with context. Actually the error is clear.

    Hold on — let me reconsider. Maybe the issue is parse_source_manifest_yaml returns something and the import_openapi_surface first arg... no.

    Actually, let me just try compiling ONLY the first new test by removing the other two, to isolate. Actually, let me reconsider the possibility that import_openapi_surface is defined to take impl AsRef<[u8]> or similar and... no, parse error.

    Wait, actually — maybe the error is real and the problem is the FIRST raw string in EACH test. Let me re-read: the manifest raw string at line 671-679. It contains base_url: https://api.example.com. That's fine.

    Hmm, but the error is at 704 not 681. So the manifest raw string's .expect at 681 is fine. So the first raw string parses. The second raw string (687-703) does NOT parse properly.

    What's different about the second raw string content vs existing tests? My second raw string has:

    openapi: 3.0.3
    paths:
      /labels:
        get:
          operationId: listLabels
          responses:
            '200':
              content:
                application/json:
                  schema: {$ref: '#/components/schemas/labels'}
    components:
      schemas:
        labels:
          type: object
          additionalProperties: false
    

    vs existing which has similar. The ONLY new thing is additionalProperties: false.

    Wait... could there be an issue with false? No, it's just text in a raw string.

    Hmm, let me actually just try to write the test using a different approach — maybe there's a subtle issue. Let me check: maybe the heredoc introduced a tab character somewhere. Let me od the whole block.

  24. GLM Assistant

    No tabs. The content looks clean. I'm quite puzzled. Let me try a different approach — let me remove my added tests and re-add them one at a time using the create/edit approach instead, to rule out heredoc issues. But first, let me verify the existing file compiled fine before my changes.

    Actually, wait. Let me reconsider — maybe the existing file did NOT compile cleanly and there's a pre-existing issue at the end. But the error clearly points to MY added lines (704, 755, 807).

    Hmm, let me try removing my additions and re-running to confirm baseline compiles.

    Actually, let me first just try to test the hypothesis that it's the additionalProperties: false line. Let me change additionalProperties: false to description: foo in the first test and see if it compiles. But that changes test semantics.

    Actually, the parse error can't be caused by string content. So it must be something structural.

    Let me look at this from a different angle. Let me count opening and closing braces/parens in my first test.

    fn importer_imports_additional_properties_false_as_closed_object() {   // {1
        let manifest = parse_source_manifest_yaml(  // (1
            r"...",
        )  // )1
        .expect("manifest");
        let v4 = manifest.as_v4().expect("v4");
        let surface = v4.surfaces.first().expect("one surface");
        let ir = import_openapi_surface(  // (2
            v4,
            surface,
            r"...",
            .as_bytes(),  <-- error here
        )
        .expect("closed object import");
        let types = ir
            .types
            .iter()
            .map(|ty| (ty.id.as_str(), ty))
            .collect::<BTreeMap<_, _>>();
        let labels = types.get("labels").expect("labels type");
        let IrTypeShape::Object { fields } = &labels.shape else {  // {2
            panic!(...);
        };  
        assert!(fields.is_empty(), "...");
    }  // }1
    

    Wait — let IrTypeShape::Object { fields } = &labels.shape else {. The else block needs { ... };. I have:

        let IrTypeShape::Object { fields } = &labels.shape else {
            panic!(...);
        };
    

    That's the let-else syntax. The else block's closing } is followed by ;. That's correct.

    Hmm, this all looks fine.

    OK, I'm going to take a totally different debugging approach. Let me just delete my additions and re-add using a Python script that writes exact content, to eliminate any heredoc weirdness. But I already verified the content with cat -A and od.

    Wait — actually, let me reconsider whether the baseline compiles. Maybe the baseline doesn't compile and the errors at 704 etc. are actually because of an EARLIER unclosed construct. Let me stash my test changes (git stash won't work since not committed, but I can git checkout the test file) and compile.

  25. GLM Assistant

    Baseline compiles. Now let me re-add my tests but using a Python script to write the exact bytes, to rule out heredoc issues. Actually, the content I verified looks fine. Let me re-add it via a file write approach.

    Actually, let me think about this more. The baseline compiles. My addition breaks. The content looks structurally identical to existing tests.

    OH WAIT. I bet I know. The issue might be the r"..." raw string content. Let me look very carefully: in the existing tests, the manifest raw string is r"\nname: .... Then closing ",.

    But wait — maybe the issue is that the FIRST raw string in my test (the manifest) is being parsed, and the SECOND r" ... hmm.

    Actually, let me just re-add and re-examine. Maybe there was a subtle issue in my heredoc that I'm not seeing in the viewing. Let me write the test file addition with Python to be 100% sure of bytes.

    Actually, let me reconsider. Let me re-add the tests ONE at a time and compile to see if even ONE fails.

    Let me restore my backup and test.

  26. GLM Assistant

    Same error with Python-written content. So it's NOT a heredoc issue. The content itself genuinely doesn't parse.

    Wait. Let me re-look at the error context. Let me get the full error with surrounding lines.

  27. GLM Assistant

    Only one error now (I only added one test). The error is at 704. Let me look at lines 700-706 once more.

  28. GLM Assistant

    The closing " is at column 1 (line 703: ",). In existing tests, the closing " is also at column 1. Let me double check the existing working one. Earlier:

    99|"
    100|        .as_bytes(),
    

    And line 99 was " at column 1 (no indent). Let me verify.

    Actually wait, in the existing test, the raw string starts with r" indented 8 spaces:

        let ir = import_openapi_surface(
            v4,
            surface,
            r"
    ...
    "
            .as_bytes(),
    

    So the closing " is at column 1 (no leading whitespace). And .as_bytes() is indented 8 spaces. That matches mine.

    Hmm. So why does mine fail but not the existing?

    Wait... maybe the existing test's raw string content ALSO contains a " somewhere? Let me check. No.

    OK let me take yet another approach. Let me REPLACE the content of an EXISTING working test with my additionalProperties content and see if it still compiles. That isolates whether it's the content or position.

    Actually, let me try something simpler: let me check if maybe there's an issue with the line BEFORE the raw string. Let me look at lines 684-688.

  29. GLM Assistant

    This is structurally identical to existing tests. Let me directly compare with an existing working test by extracting both blocks and diffing the structure.

    Let me extract the existing first test's import_openapi_surface call block (lines ~67-100) and compare byte structure with mine.

    Actually, let me try a focused experiment: Let me take the EXISTING test importer_recognizes_common_wrapped_list_response_fields and append a duplicate of it at the end of the file (copy-paste the same content) and see if it compiles. If a verbatim copy of an existing test fails to compile when appended, then there's something about appending at the end (like missing final newline).

    Actually wait — the original file ended at line 666 with }. Did it have a trailing newline? git checkout restored it. Let me check if the file ends with newline. When I appended via Python f.write(addition) where addition starts with \n, the result is }\n\n#[test].... That's fine.

    Hmm, but actually — maybe the original file does NOT end with a newline (no trailing newline after the final }). Then } is the last char, and appending \n#[test] gives }\n#[test]. Still fine.

    Let me actually do the verbatim-copy experiment.

  30. GLM Assistant

    Let me extract a complete existing test (lines 39-115 or so) and append a renamed copy verbatim to the end, then compile.

  31. GLM Assistant

    A verbatim copy of the existing test appended at the end compiles fine (just a dead_code warning). So appending at the end is fine, and the existing test structure compiles.

    So the issue is specifically MY content. The structure is identical but content differs. The only content difference is additionalProperties: false and the schema.

    Wait, but string content can't cause a parse error... unless...OH. I think I finally get it. A raw string literal r"..." in Rust — the closing " must be followed by something that's NOT part of the string. But here's the thing: raw strings CANNOT contain a " character. My content has '#/components/schemas/labels' (single quotes). No ".

    But the existing test content ALSO has '#/components/schemas/Incident'. Same.

    So content difference: existing has pagination:\n type: object and data:\n type: array\n items: {...}. Mine has additionalProperties: false.

    Hmm, neither contains ".

    Wait, let me actually look at this from the angle of: maybe the error is NOT actually a parse error of the raw string, but the .as_bytes() is being seen as a statement-start. That would happen if the expression before it ended with ; or }.

    import_openapi_surface(v4, surface, r"...", .as_bytes(),) — the r"..." is an argument, then .as_bytes() is... wait, no. The structure is:

            r"
    ...
    "
            .as_bytes(),
    

    This is r"..." .as_bytes() — a method call on the raw string. That's valid. The raw string is r"\nopenapi...false\n", then .as_bytes().

    This is EXACTLY what existing tests do. So it should parse.

    Unless... the raw string is NOT terminated. Let me check: is there a " character somewhere in my content that closes the raw string early? Let me grep my appended block for any ".

    Actually — wait. I just removed my test and added the dup. Let me re-add MY test now and grep for " inside.

  32. GLM Assistant

    Only the opening r" and closing " contain double quotes. No " inside. So the raw string is well-formed.

    Let me compile.

  33. GLM Assistant

    Still fails. The raw string is well-formed. This is bizarre.

    Wait — maybe the issue is that r"\n... the raw string content includes the \n literal at the start? No, that's fine.

    Let me try the experiment: take the existing working test, and JUST change its schema content to include additionalProperties: false. If that breaks, then content DOES matter (which would be very strange). Let me do that.

    Actually, let me take my failing block and replace the additionalProperties: false line and the schema ref line to match the existing test exactly, keeping the rest.

    Actually, simpler: let me take my EXACT failing test and change additionalProperties: false to description: closed and see.

    Hmm, but content shouldn't matter for parsing...

    WAIT. I think I finally understand. The raw string is r"...". In Rust, r"..." raw strings — the content can contain anything EXCEPT a ". BUT what about the case where the content has a backslash followed by something? No, raw strings don't process escapes.

    Hold on, let me reconsider the ACTUAL error. "expected expression, found .". The . is at 704:9. What if the parser actually parsed the raw string correctly, but then sees .as_bytes() and the issue is that the raw string is the LAST argument and there's a trailing comma issue? No.

    Actually, you know what, let me just try a COMPLETELY minimal test to see the pattern. Let me remove my test and add the simplest possible:

  34. GLM Assistant

    Even the minimal one fails! So it's NOT about my content at all. The minimal r"\nhello\n", .as_bytes() fails. But the existing tests with the SAME pattern compile fine!

    Wait, the difference: in existing tests, the raw string r"..." is preceded by being on its own line with the function args. And the closing " is at column 1.

    Hold on. Let me look REALLY carefully at the existing working one's bytes around the closing " and .as_bytes().

  35. GLM Assistant

    I see: the existing one is ...string}\n"\n .as_bytes(),. The " is preceded by }\n and followed by \n .as_bytes().

    Now let me look at MY minimal one's bytes.

  36. GLM Assistant

    FOUND IT!

    In the existing working test, the closing is:

    ...string}\n"\n        .as_bytes(),
    

    i.e., " on its OWN line (just "\n), then .as_bytes() on the next line.

    In MY failing test, the closing is:

    ...hello\n",\n        .as_bytes(),
    

    i.e., ", — the " is IMMEDIATELY followed by a comma , on the SAME line!

    Look: o \n " , \n. So it's hello\n",\n. The " and , are on the same line: ",.

    In the existing test: g } \n " \n — that's string}\n"\n. The " is alone on its line, NO comma on the same line. The comma comes AFTER .as_bytes(): .as_bytes(),.

    So in the existing tests, the pattern is:

    r"
    ...
    content
    "
            .as_bytes(),
    

    The closing " is on its own line, then .as_bytes(), on the next line (the comma is after as_bytes).

    In MY test (from the heredoc), the pattern was:

    r"
    ...
    content
    ",
            .as_bytes(),
    

    The closing " is followed by , on the same line: ",, then .as_bytes(), on the next line.

    So my version has r"...", .as_bytes() which is r"..." followed by , (comma) then .as_bytes(). That's (string-literal, .as_bytes()) — the comma terminates the raw string as a separate argument, and then .as_bytes() starts a NEW expression which is invalid!

    YES. That's the bug. The heredoc I wrote had ", (closing quote + comma) then .as_bytes(), (with its own comma). I added an EXTRA comma after the raw string.

    So the fix: the raw string closing " should be on its own line WITHOUT a trailing comma, then .as_bytes(), on the next line. Like the existing tests.

    Let me fix my test additions to match the existing pattern: " on its own line, then .as_bytes(),.

  37. GLM Assistant

    It compiles now. Let me run the new tests:

  38. GLM Assistant

    The tests fail because the type IDs aren't found. Let me look at how types get imported and named. Let me check the import flow:

  39. GLM Assistant

    Let me check resolve_ref:

  40. GLM Assistant

    I see. The type isn't registered under the schema name "labels" — it's registered under a derived id from the operation. Let me look at how the importer_preserves_ref_backed_property_descriptions test looks up the type via operation.output.type_ref:

  41. GLM Assistant

    I'll rewrite my tests to inline the response schema and look up the type via operation.output.type_ref, matching the existing test pattern. Let me remove my current additions and rewrite them:

  42. GLM Assistant

    Two tests pass but the map test name didn't match the filter. Let me run it specifically:

  43. GLM Assistant

    All three new tests pass. Now let me verify my fix handles the bug correctly by confirming the pre-fix behavior would have failed. Let me also run the full coral-spec test suite to ensure nothing broke:

  44. GLM Assistant

    All 222 tests pass. Now let me verify the fix actually addresses the bug by temporarily reverting the source change and confirming the new test fails without the fix:

  45. GLM Assistant

    The test confirms the bug: without the fix, additionalProperties: false was imported as Map { value_type_ref: "listlabels_row_value" } — a free-form map. With the fix, it's a closed empty object.

    Now let me run clippy to ensure no lint issues with my changes:

  46. GLM Assistant

    No clippy warnings. Let me review the final diff:

  47. GLM Assistant

    The diff looks clean. Let me check if there's a CHANGELOG convention that should be updated:

  48. GLM Assistant

    The CHANGELOG is auto-generated by release-please, so I won't edit it manually.

    Let me do a final full test run of coral-spec to confirm everything is green:

  49. GLM Assistant

    All tests pass. Let me do a final review of the complete change set:

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.