Skip to content

Commit 2fee606

Browse files
committed
FEATURE-v3-source-layout: deliver compiled-operation checker
Track the exact validated compiled-operation checker with a narrow ignore exception. Verified exported source distribution, symbol checks, and installed static multi-TU consumers in both TLS lanes; unchanged production suite and package evidence retained.
1 parent 4668a29 commit 2fee606

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,6 @@ __pycache__/
166166
!scripts/run-v3-packaged-adapters.py
167167
!scripts/check-v3-public-http1.py
168168
!scripts/test-v3-packaged-adapters.py
169+
170+
# v3 source-layout compiled implementation contract checker.
171+
!scripts/check-v3-compiled-operations.py
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/usr/bin/env python3
2+
"""Check the installed-library implementation contract for representative operations."""
3+
import argparse
4+
import subprocess
5+
6+
# These operations must have a library-owned definition even when no consumer
7+
# instantiates them. Behavioral suites cover their semantics independently.
8+
OPERATIONS = (
9+
'httpserver::http::fields::append(',
10+
'httpserver::server::server_options::validate(',
11+
'httpserver::server::resource_budget::reserve(',
12+
'httpserver::server::route_pattern::parse(',
13+
'httpserver::server::make_sync_route(',
14+
'httpserver::manual_executor::run_one(',
15+
'httpserver::detail::current_executor_slot(',
16+
'httpserver::detail::task_frame_base::finish(',
17+
'httpserver::stop_token::cancellation_awaiter::await_suspend(',
18+
'httpserver::detail::fire_trigger(',
19+
'httpserver::exchange::admit_body(',
20+
'httpserver::body_reader::collect(',
21+
'httpserver::response_writer::finish(',
22+
'httpserver::response_definition::owned_bytes(',
23+
'httpserver::send_definition(',
24+
'httpserver::detail::send_cursor::pull(',
25+
'httpserver::detail::http1_head_parser::',
26+
'httpserver::detail::hpack_decoder::',
27+
'httpserver::detail::qpack_decoder::',
28+
'httpserver::websocket::options::validate(',
29+
'httpserver::detail::http2_dispatch::post(',
30+
'httpserver::detail::valid_http1_host(',
31+
'httpserver::detail::unescape_buf_raw(',
32+
'httpserver::detail::owned_completion_storage::claim_read(',
33+
)
34+
35+
36+
def main():
37+
parser = argparse.ArgumentParser(description=__doc__)
38+
parser.add_argument('library')
39+
args = parser.parse_args()
40+
result = subprocess.run(['nm', '-C', args.library],
41+
check=True, text=True, capture_output=True)
42+
definitions = [line for line in result.stdout.splitlines()
43+
if ' T ' in line]
44+
missing = [name for name in OPERATIONS if not any(name in line for line in definitions)]
45+
if missing:
46+
raise SystemExit('Missing compiled library operations:\n' + '\n'.join(missing))
47+
print('PASS representative operations have compiled library definitions')
48+
49+
50+
if __name__ == '__main__':
51+
main()

0 commit comments

Comments
 (0)