The answer to your question within the context of The Smiths? Morrissey and Marr would get the credit. The industry standard is music+melody+lyrics=songwriting credit. Bass lines, drum parts and even guitar riffs written by a second guitarist may or may not rise to the level of writing credit, it depends on the situation. Some bands like U2 or Sonic Youth just give credit to all members equally to avoid these squabbles. So even though Ringo wrote many a drum part for The Beatles, he never got songwriting credit for them.
Working on chords and key changes is just what a producer usually does. What are you getting at? The Smiths had many songs with ingenious guitar parts that came before Porter and many, many after him. To suggest that he was some Svengali pulling Johnny's strings is insulting. Yes they worked on overdubs together... Porter was producing a brilliant young talent who loved guitars and loved learning about the recording process.
The only thing I can think of that Johnny Marr did in his own right, that came close to the subtlety and sophistication of the Porter-produced 'This Charming Man', 'William, It Was Really Nothing' and 'How Soon Is Now' would be 'The Headmaster Ritual' - and even that isn't in the same league.
Reference to 'industry standards' is of course one answer to the question posed by this thread, although your own post above would seem to indicate that there is no such thing as an industry standard.
What I think is being got at is that 'working on chords and key changes' (as well as arranging and re-arranging guitar parts etc) may constitute such a substantial contribution to the end musically product as to be justifiably regarded as meriting a compositional credit. A lot of people seem to be hung up on the idea of Marr as a song'writer' and 'composer', as if he notated every guitar harmony onto sheet music, before bringing it into the studio. He didn't. He laid down a guitar riff and probably some basic harmonies, took it into the studio, and that was then worked on. Why is the creative process that took place in the studio to be regarded as any less worthy of a musical credit than the creative process of Marr coming up with ideas on his guitar? Especially when the end results suggest that the contribution of one particular person (Porter) seemed to result in music that was more sonically sophisticated and richly harmonic, and more structurally subtler, than those records that were recorded without his assistance. When people talk about Marr's 'trademark jingle-jangle' sound, and when Marr talked in years gone by, of trying to get away from that sound, it's essentially these Porter-produced records that they're referring to. As to why Marr was so keen to distance himself from that sound, my impression is that he knew he just couldn't re-create it on his own. Listen to 'For You' on Electronic's second album, as a rare example of an instance when he tried to. It's an obvious effort to recapture the sound of 'This Charming Man', but it's crude by comparison. This is why Marr has never fully recaptured the sound for which he was famous 'when he was in The Smiths' (as people say, when what they would really mean, if they think about, is 'on those Smiths records produced by John Porter). This is not to suggest that he was a Svengali pulling Johnny's strings. Marr is clearly a brilliant and creative guitarist. But Porter is clearly a gifted produced/arranger whose contributions to the music were obviously substantial. I don't see that being the guitarist automatically makes you the composer of the finished music. The recording studio is also an instrument in the creative process. Why is the music on the finished record to be arbitrarily credited to the guy who brought in the original musical ideas, but not to anyone who then contributed further ideas?
All of which is really a sideshow to the main contention of this thread - that, regardless of any 'industry standard', a song does not, to my mind, equal music + melody + lyrics; it is in essence the vocal melody/lyrics, for reasons I've gone into in more detail above. This is how songs survived and were passed through the generations for centuries before recorded music. Cover versions always feel free to rearrange and sometimes drastically alter the music, but rarely substantially alter the vocal melody which is usually the reason the song is loved in the first place (and if the they do, they tend to pilloried). As I say, by all means credit Marr (and whoever else) with the music; credit Morrissey with the songs - but distinguish between the two: music and the songs that it gives rise to. That's what I'm arguing for. Take away the vocal melody/lyric, and you're left with a piece of music. Take away the backing music, to leave the vocal melody acapella, and you still have a song.
S.F.